summaryrefslogtreecommitdiff
path: root/http-fetch.c
diff options
context:
space:
mode:
authorNick Hengeveld <nickh@reactrix.com>2006-03-15 16:59:52 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-03-15 17:10:41 (GMT)
commitc982647310fc5acd0bd6ebc408e70470447b387f (patch)
tree3ce860bebbc9a530e96cc5785fa59b9ed2d7e6c9 /http-fetch.c
parentea75cb7284f79250bebb6dd48c6161b0f1b4c1c6 (diff)
downloadgit-c982647310fc5acd0bd6ebc408e70470447b387f.zip
git-c982647310fc5acd0bd6ebc408e70470447b387f.tar.gz
git-c982647310fc5acd0bd6ebc408e70470447b387f.tar.bz2
Fix broken slot reuse when fetching alternates
When fetching alternates, http-fetch may reuse the slot to fetch non-http alternates if http-alternates does not exist. When doing so, it now needs to update the slot's finished status so run_active_slot waits for the non-http alternates request to finish. Signed-off-by: Nick Hengeveld <nickh@reactrix.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'http-fetch.c')
-rw-r--r--http-fetch.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/http-fetch.c b/http-fetch.c
index 8fd9de0..7de818b 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -468,9 +468,13 @@ static void process_alternates_response(void *callback_data)
alt_req->url);
active_requests++;
slot->in_use = 1;
+ if (slot->finished != NULL)
+ (*slot->finished) = 0;
if (!start_active_slot(slot)) {
got_alternates = -1;
slot->in_use = 0;
+ if (slot->finished != NULL)
+ (*slot->finished) = 1;
}
return;
}