Commit Graph

19 Commits

Author SHA1 Message Date
Kevin Easton
55d3b28060 dcc.c: Fix mismatching format strings in get_dcc_info() and dcc_ftpcommand().
Cast time_t value to long and use %ld to print.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@469 13b04d17-f746-0410-82c6-800466cd88b0
2013-11-16 00:18:39 +00:00
Tim Cava
112b38ac7a Revert the last commit. It accidentally had autogenerated files in it.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@432 13b04d17-f746-0410-82c6-800466cd88b0
2013-11-07 03:00:24 +00:00
Tim Cava
276fd24258 Use snprintf rather than sprintf. From pvaldes.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@431 13b04d17-f746-0410-82c6-800466cd88b0
2013-11-07 02:41:16 +00:00
Kevin Easton
590ae4c685 Further cleanups in dcc.c, removing unused variables and reworking dcc_exempt_save().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@430 13b04d17-f746-0410-82c6-800466cd88b0
2013-11-06 10:35:16 +00:00
Kevin Easton
15894eb006 Some simplification / cleanup in dcc_glist().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@429 13b04d17-f746-0410-82c6-800466cd88b0
2013-11-05 13:07:06 +00:00
Tim Cava
0b32d978f8 Actually use strlcpy.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@352 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 07:31:03 +00:00
Tim Cava
9a36857761 Use strlcpy, rather than strmcpy, in new_dcc_message_transmit().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@351 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 07:29:02 +00:00
Kevin Easton
0b0dbf5cf7 Make the RANDOM_LOCAL_PORTS setting actually use a random port.
The code was calling random_number(65535 - 1024), but a non-zero argument
to random_number() is actually a seed to reseed the generator, and causes
random_number() to return zero.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@331 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-15 15:06:21 +00:00
Tim Cava
e070369079 Make the namelen passed to getsockname() a socklen_t everywhere.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@280 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 03:26:00 +00:00
Tim Cava
80cfa9c5d8 Make the namelen passed to getpeername() a socklen_t everywhere.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@279 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 03:18:47 +00:00
Tim Cava
27ed98a03d Make the addrlen passed to my_accept() a socklen_t everywhere.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@278 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 03:09:16 +00:00
Tim Cava
b4cd944bef The third argument to accept() should be a socklen_t.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@269 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-13 22:21:32 +00:00
Kevin Easton
8a04cbeba8 Don't pass the output of convert_output_format(FORMAT_DCC, ...) directly to
sprintf() as a format string, because there could (and usually are!) '%'
characters that will be interpreted by sprintf.

This also allows clean compilation under -Werror=format-security.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@246 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-23 14:36:32 +00:00
Kevin Easton
d1e13bc526 Show correct message ("Remote end closed connection") when we get EOF
on a socket.

I also added a wrapper function around strerror() for dgets_errno, since
we did the same thing in a few places.  This all needs to be cleaned up
a little - the -1 value we use could in theory clash with an actual
errno error number.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@104 13b04d17-f746-0410-82c6-800466cd88b0
2010-09-30 13:26:06 +00:00
Kevin Easton
a6636dd449 Add missing third parameter to open().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@65 13b04d17-f746-0410-82c6-800466cd88b0
2009-09-08 12:44:03 +00:00
Kevin Easton
cc9073707e Merge r22 from branches/ircii-pana-1.1
Fix spelling error in dcc.c


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@39 13b04d17-f746-0410-82c6-800466cd88b0
2008-05-07 11:00:16 +00:00
Kevin Easton
3de93b1dbc Far-reaching changes to make BitchX compatible with 64 bit architectures
like x86-64, where sizeof(int) != sizeof (void *).  This involves correctly
casting every function pointer from the global table to the correct
function type, which has the added benefit of allowing type-checking of
function arguments and return values.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@26 13b04d17-f746-0410-82c6-800466cd88b0
2008-04-30 13:57:56 +00:00
Kevin Easton
533c3dbcbf Turn on SVN keyword replacement for $Date$, $Author$, $Revision$, $Id$ for all
*.c and *.h files.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/branches/ircii-pana-1.1@3 13b04d17-f746-0410-82c6-800466cd88b0
2008-02-25 09:49:14 +00:00
Kevin Easton
28febcfea9 Initial import of the ircii-pana-1.1-final source tree.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/tags/ircii-pana-1.1-final@1 13b04d17-f746-0410-82c6-800466cd88b0
2008-02-25 09:25:32 +00:00