summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 67ffdf4)
raw | patch | inline | side by side (parent: 67ffdf4)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Sun, 6 Nov 2005 23:59:39 +0000 (00:59 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 7 Nov 2005 02:31:47 +0000 (18:31 -0800) |
When curl_message is released using curl_multi_remove_handle(), it's
contents are undefined. Therefore, get the information before releasing it.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
contents are undefined. Therefore, get the information before releasing it.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
http-fetch.c | patch | blob | history |
diff --git a/http-fetch.c b/http-fetch.c
index b12779dcb4a1ce92db94f545e1b78d7ea8b098e0..ea8af1b2defaf7e11dff0a09952234f3c7626376 100644 (file)
--- a/http-fetch.c
+++ b/http-fetch.c
while (curl_message != NULL) {
if (curl_message->msg == CURLMSG_DONE) {
+ int curl_result = curl_message->data.result;
slot = active_queue_head;
while (slot != NULL &&
slot->curl != curl_message->easy_handle)
active_requests--;
slot->done = 1;
slot->in_use = 0;
- slot->curl_result = curl_message->data.result;
+ slot->curl_result = curl_result;
curl_easy_getinfo(slot->curl,
CURLINFO_HTTP_CODE,
&slot->http_code);
fprintf(stderr, "Received DONE message for unknown request!\n");
}
if (request != NULL) {
- request->curl_result =
- curl_message->data.result;
+ request->curl_result = curl_result;
request->http_code = slot->http_code;
request->slot = NULL;
request->state = COMPLETE;