projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Small bugfixes for http-push.c
[git.git]
/
http-push.c
diff --git
a/http-push.c
b/http-push.c
index
8e953a6
..
0b90fb9
100644
(file)
--- a/
http-push.c
+++ b/
http-push.c
@@
-28,6
+28,15
@@
static const char http_push_usage[] =
#define NO_CURL_EASY_DUPHANDLE
#endif
#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 */
#define RANGE_HEADER_SIZE 30
/* DAV method names and request body templates */
@@
-731,11
+740,12
@@
void process_curl_messages(void)
slot->curl != curl_message->easy_handle)
slot = slot->next;
if (slot != NULL) {
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;
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);
curl_easy_getinfo(slot->curl,
CURLINFO_HTTP_CODE,
&slot->http_code);
@@
-1236,7
+1246,7
@@
struct active_lock *lock_remote(char *file, long timeout)
in_buffer.posn = 0;
in_buffer.buffer = in_data;
in_buffer.posn = 0;
in_buffer.buffer = in_data;
- new_lock = x
malloc(
sizeof(*new_lock));
+ new_lock = x
calloc(1,
sizeof(*new_lock));
new_lock->owner = NULL;
new_lock->token = NULL;
new_lock->timeout = -1;
new_lock->owner = NULL;
new_lock->token = NULL;
new_lock->timeout = -1;