dcc: Improve handling multiple resumable offers

Multiple offers for the same file are resumable. Attempts to resume more
than one of the offers causes the other offers to start a new file.

Closes #1764
Fixes #1763
This commit is contained in:
Daniel Boland 2016-07-07 21:51:44 +01:00 committed by Patrick Griffis
parent f845af0370
commit ba87247781

View File

@ -2147,7 +2147,8 @@ update_is_resumable (struct DCC *dcc)
{
d = list->data;
if (d->type == TYPE_RECV && d->dccstat != STAT_ABORTED &&
d->dccstat != STAT_DONE && d->dccstat != STAT_FAILED)
d->dccstat != STAT_DONE && d->dccstat != STAT_FAILED &&
d->dccstat != STAT_QUEUED)
{
if (d != dcc && is_same_file (d, dcc))
{
@ -2341,6 +2342,8 @@ dcc_resume (struct DCC *dcc)
{
char tbuf[500];
update_is_resumable (dcc);
if (dcc->dccstat == STAT_QUEUED && dcc->resumable)
{
dcc->resume_sent = 1;