diff options
author | Daniel Boland <email@dannyboland.com> | 2016-07-07 21:51:44 +0100 |
---|---|---|
committer | Patrick Griffis <tingping@tingping.se> | 2016-07-20 14:11:01 -0400 |
commit | ba872477812bfec457a7b53ac61179dcda6bd0ee (patch) | |
tree | 3f0d0ee5eba539dec68ebab2693ade1f0dc16e44 /src/common | |
parent | f845af037055a58fce73f1319324558c2f2b571d (diff) |
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
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/dcc.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; |