Bug in DCC RECVFILE??
Brought to you by:
gyunaev
Had problems with receiving Files via DCC from Clients
to Client both using this LIB. It seemed that the
incoming_buf sometimes only get filled to buffersize-1
and next call to Callback only filled with 1 byte data.
However, i solved it by editing line 296 in dcc.c. Please
see attached file and confirm if this solves or only i had
trouble with DCC.
fixed dcc.c
Logged In: YES
user_id=1115709
Such problem will arise if you send files with size == sizeof
(dcc->incoming_buf). By changing the line 296, you solve this
problem, but it will still arise if you send file with size == sizeof
(dcc->incoming_buf) + 1.
If it is a real problem (i.e. you have a lot of files which have
length multiple on 1024), you probably just need to increase
LIBIRC_DCC_BUFFER_SIZE. Even though the value of 1024
specified in DCC "standard", I think 8192 is more reasonable
for modern networks.
Please tell me whether it helps or not.
Logged In: YES
user_id=865132
thanks for you reply.
this problem appeared on every file i tried to send from a
client to a client (both) using this lib. it worked with other irc
clients for sending and receiving, but not with 2 clients using
this lib for any file. it started transfering and ended after 1k. i
changed the buffer size before to a higher value, pe 2k, and
all files anded after 2k then. it stopped just after running the
callback only one time. after i changed the line, it solved
every problem i had with DCC filetransfer.
Logged In: YES
user_id=1115709
Yes, after the investigation I can confirm you're right.
The problem source is that DCC transfer sends the data using
the whole buffer (line 426 in dcc.c), but receives it to the buffer
with size 1 byte less.
I fixed the bug and will release version 1.1.