git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Fix broken slot reuse when fetching alternates

From
NHNick Hengeveld <nickh@reactrix.com>
Date
Mar 15, 2006, 16:59 UTC
Message-ID
<20060315165952.GK3997@reactrix.com>

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>
---
 http-fetch.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
e0e27549c5cbc85639f7d329a8a900ca7243130c
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(
 					 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;
 		}
-- 
1.2.4.gea75-dirty
Message 1 of 1 in “Fix broken slot reuse when fetching alternates”
  1. Fix broken slot reuse when fetching alternatesNick Hengeveld, Mar 15, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.