summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorDaniel Boland <email@dannyboland.com>2016-07-07 21:51:44 +0100
committerPatrick Griffis <tingping@tingping.se>2016-07-20 14:11:01 -0400
commitba872477812bfec457a7b53ac61179dcda6bd0ee (patch)
tree3f0d0ee5eba539dec68ebab2693ade1f0dc16e44 /src
parentf845af037055a58fce73f1319324558c2f2b571d (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')
-rw-r--r--src/common/dcc.c5
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;