#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 */
}
}
-int refresh_lock(struct active_lock *lock)
+static int refresh_lock(struct active_lock *lock)
{
struct active_request_slot *slot;
char *if_header;
}
#ifdef USE_CURL_MULTI
-void process_curl_messages(void)
+static void process_curl_messages(void)
{
int num_messages;
struct active_request_slot *slot;
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);
}
}
-void process_request_queue(void)
+static void process_request_queue(void)
{
struct transfer_request *request = request_queue_head;
struct active_request_slot *slot = active_queue_head;
}
#endif
-void process_waiting_requests(void)
+static void process_waiting_requests(void)
{
struct active_request_slot *slot = active_queue_head;
}
}
-void add_request(unsigned char *sha1, struct active_lock *lock)
+static void add_request(unsigned char *sha1, struct active_lock *lock)
{
struct transfer_request *request = request_queue_head;
struct packed_git *target;
return 0;
}
-static int fetch_indices()
+static int fetch_indices(void)
{
unsigned char sha1[20];
char *url;
}
}
-struct active_lock *lock_remote(char *file, long timeout)
+static struct active_lock *lock_remote(char *file, long timeout)
{
struct active_request_slot *slot;
struct buffer out_buffer;
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;
return new_lock;
}
-int unlock_remote(struct active_lock *lock)
+static int unlock_remote(struct active_lock *lock)
{
struct active_request_slot *slot;
char *lock_token_header;
return rc;
}
-int check_locking()
+static int check_locking(void)
{
struct active_request_slot *slot;
struct buffer in_buffer;
return 1;
}
-int is_ancestor(unsigned char *sha1, struct commit *commit)
+static int is_ancestor(unsigned char *sha1, struct commit *commit)
{
struct commit_list *parents;
return 0;
}
-void get_delta(unsigned char *sha1, struct object *obj,
- struct active_lock *lock)
+static void get_delta(unsigned char *sha1, struct object *obj,
+ struct active_lock *lock)
{
struct commit *commit;
struct commit_list *parents;
}
}
-int update_remote(unsigned char *sha1, struct active_lock *lock)
+static int update_remote(unsigned char *sha1, struct active_lock *lock)
{
struct active_request_slot *slot;
char *out_data;