From ba872477812bfec457a7b53ac61179dcda6bd0ee Mon Sep 17 00:00:00 2001 From: Daniel Boland Date: Thu, 7 Jul 2016 21:51:44 +0100 Subject: 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 --- src/common/dcc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/dcc.c b/src/common/dcc.c index 055098b2..954e6b91 100644 --- a/src/common/dcc.c +++ b/src/common/dcc.c @@ -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; -- cgit 1.4.1