summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0dd276b)
raw | patch | inline | side by side (parent: 0dd276b)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Mon, 7 Nov 2005 18:23:11 +0000 (19:23 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 7 Nov 2005 21:29:41 +0000 (13:29 -0800) |
This patch fixes three things:
- older libexpat does not know about enum XML_Status
- as in my patch for http-fetch, do not rely on a curl result in
free()d data
- calloc the new_lock structure
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
- older libexpat does not know about enum XML_Status
- as in my patch for http-fetch, do not rely on a curl result in
free()d data
- calloc the new_lock structure
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
http-push.c | patch | blob | history |
diff --git a/http-push.c b/http-push.c
index 8e953a67596cf0f5c12f2d8c66055759a7d2201c..0b90fb9ae3396d0f2b0a9ebf9acad8374f3db317 100644 (file)
--- a/http-push.c
+++ b/http-push.c
#define NO_CURL_EASY_DUPHANDLE
#endif
+#ifndef XML_STATUS_OK
+enum XML_Status {
+ XML_STATUS_OK = 1,
+ XML_STATUS_ERROR = 0
+};
+#define XML_STATUS_OK 1
+#define XML_STATUS_ERROR 0
+#endif
+
#define RANGE_HEADER_SIZE 30
/* DAV method names and request body templates */
slot->curl != curl_message->easy_handle)
slot = slot->next;
if (slot != NULL) {
+ int curl_result = curl_message->data.result;
curl_multi_remove_handle(curlm, slot->curl);
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);
in_buffer.posn = 0;
in_buffer.buffer = in_data;
- new_lock = xmalloc(sizeof(*new_lock));
+ new_lock = xcalloc(1, sizeof(*new_lock));
new_lock->owner = NULL;
new_lock->token = NULL;
new_lock->timeout = -1;