summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-03-13 00:01:57 -0800
committerJunio C Hamano <junkio@cox.net>2006-03-13 00:01:57 -0800
commit2e158bee7a33fac33c300f703396ee1ce1ad7a7d (patch)
tree784c88eea7078f72a2cd5990b72aefa5b2ba4798 /http.c
parent4a6c77cc0a2c9826d532c0ef1da4def8d8188584 (diff)
parent1a703cba6dac85936a5026587a90dcb827d00088 (diff)
downloadgit-2e158bee7a33fac33c300f703396ee1ce1ad7a7d.tar.gz
Merge branch 'nh/http'
* nh/http: http-push: cleanup http-push: support for updating remote info/refs http-push: improve remote lock management http-push: refactor remote file/directory processing HTTP slot reuse fixes http-push: fix revision walk
Diffstat (limited to 'http.c')
-rw-r--r--http.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/http.c b/http.c
index 14a7669cd4..9604e3326b 100644
--- a/http.c
+++ b/http.c
@@ -339,6 +339,7 @@ struct active_request_slot *get_active_slot(void)
slot->in_use = 1;
slot->local = NULL;
slot->results = NULL;
+ slot->finished = NULL;
slot->callback_data = NULL;
slot->callback_func = NULL;
curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, pragma_header);
@@ -389,8 +390,10 @@ void run_active_slot(struct active_request_slot *slot)
fd_set excfds;
int max_fd;
struct timeval select_timeout;
+ int finished = 0;
- while (slot->in_use) {
+ slot->finished = &finished;
+ while (!finished) {
data_received = 0;
step_active_slots();
@@ -442,6 +445,9 @@ static void finish_active_slot(struct active_request_slot *slot)
closedown_active_slot(slot);
curl_easy_getinfo(slot->curl, CURLINFO_HTTP_CODE, &slot->http_code);
+ if (slot->finished != NULL)
+ (*slot->finished) = 1;
+
/* Store slot results so they can be read after the slot is reused */
if (slot->results != NULL) {
slot->results->curl_result = slot->curl_result;