#1578 Bug with large DCC transfers (2.8.9)

open
nobody
None
5
2013-05-11
2013-05-11
Vincent Pizzo
No

I'm not sure of the exact size where this starts to become an issue, but when I'm downloading a large file, say 8GB+, consistently the download will report "Failed" right before the end. It does not complete the transfer and it finishes just shy of completion. For example, it will fail when it reaches 12312.12GB/12313.54GB. I can finish the transfer by doing a dcc resume about 5-6 times to get the remaining part of the file - it appears it fetches one block of data each time then fails again. I haven't gotten the chance to debug, but I believe there may be an issue in dcc.c. As a side note, the GUI reports 100% when it reaches 12312.12GB/12313.54GB, which it may be better to round down rather than round up.

/* DCC complete check */
if (dcc->pos >= dcc->size && dcc->ack >= (dcc->size & 0xffffffff))
{
dcc->ack = dcc->size; /* force 100% ack for >4 GB */
dcc_close (dcc, STAT_DONE, FALSE);
dcc_calc_average_cps (dcc); /* this must be done _after_ dcc_close, or dcc_remove_from_sum will see the wrong value in dcc->cps */
sprintf (buf, "%d", dcc->cps);
EMIT_SIGNAL (XP_TE_DCCSENDCOMP, dcc->serv->front_session,
file_part (dcc->file), dcc->nick, buf, NULL, 0);
}

Discussion