modify patches so they still apply (though don't build)

This commit is contained in:
Trolli Schmittlauch 2019-12-26 01:28:02 +01:00
parent 7cc9c9adab
commit 53b07d930e

View file

@ -27,49 +27,10 @@ Subject: [PATCH] Update upload-file.c
1 file changed, 15 insertions(+), 15 deletions(-)
adjusted by schmittlauch
diff --git a/server/upload-file.c b/server/upload-file.c
index 21f955a..0606b28 100755
--- a/server/upload-file.c
+++ b/server/upload-file.c
@@ -2266,7 +2266,7 @@ out:
/* Set keepalive to 0. This will cause evhtp to close the
* connection after sending the reply.
*/
- req->keepalive = 0;
+ evhtp_request_set_keepalive(req, 0);
fsm->state = RECV_ERROR;
}
@@ -2550,8 +2550,8 @@ upload_headers_cb (evhtp_request_t *req, evhtp_headers_t *hdr, void *arg)
}
/* Set up per-request hooks, so that we can read file data piece by piece. */
- evhtp_set_hook (&req->hooks, evhtp_hook_on_read, upload_read_cb, fsm);
- evhtp_set_hook (&req->hooks, evhtp_hook_on_request_fini, upload_finish_cb, fsm);
+ evhtp_request_set_hook (req, evhtp_hook_on_read, upload_read_cb, fsm);
+ evhtp_request_set_hook (req, evhtp_hook_on_request_fini, upload_finish_cb, fsm);
/* Set arg for upload_cb or update_cb. */
req->cbarg = fsm;
@@ -2566,7 +2566,7 @@ err:
/* Set keepalive to 0. This will cause evhtp to close the
* connection after sending the reply.
*/
- req->keepalive = 0;
+ evhtp_request_set_keepalive(req, 0);
send_error_reply (req, EVHTP_RES_BADREQ, err_msg);
g_free (repo_id);
diff --git a/server/upload-file.c b/server/upload-file.c
index 8dc6001..5233b50 100755
--- a/server/upload-file.c
+++ b/server/upload-file.c
@@ -2905,38 +2905,38 @@ upload_file_init (evhtp_t *htp, const char *http_temp_dir)
cb = evhtp_set_regex_cb (htp, "^/upload/.*", upload_cb, NULL);
/* upload_headers_cb() will be called after evhtp parsed all http headers. */
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
--- a/server/upload-file.c 2019-12-26 00:43:14.743019721 +0100
+++ b/server/upload-file.new 2019-12-26 01:05:11.166580920 +0100
@@ -2724,32 +2724,32 @@
g_free (cluster_shared_dir);
cb = evhtp_set_regex_cb (htp, "^/upload-api/.*", upload_api_cb, NULL);
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
@ -90,10 +51,6 @@ index 8dc6001..5233b50 100755
cb = evhtp_set_regex_cb (htp, "^/upload-aj/.*", upload_ajax_cb, NULL);
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
cb = evhtp_set_regex_cb (htp, "^/update/.*", update_cb, NULL);
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
cb = evhtp_set_regex_cb (htp, "^/update-api/.*", update_api_cb, NULL);
@ -106,15 +63,15 @@ index 8dc6001..5233b50 100755
/* cb = evhtp_set_regex_cb (htp, "^/update-blks-aj/.*", update_blks_ajax_cb, NULL); */
- /* evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL); */
+ /* evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL); */
+ /* evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL); */
cb = evhtp_set_regex_cb (htp, "^/update-aj/.*", update_ajax_cb, NULL);
- evhtp_set_hook(&cb->hooks, evhtp_hook_on_headers, upload_headers_cb, NULL);
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
+ evhtp_callback_set_hook(cb, evhtp_hook_on_headers, upload_headers_cb, NULL);
evhtp_set_regex_cb (htp, "^/upload_progress.*", upload_progress_cb, NULL);
From b6c41aae74f1eb285a033125f4a5af578c8efbb6 Mon Sep 17 00:00:00 2001
From b6c41aae74f1eb285a033125f4a5af578c8efbb6 Mon Sep 17 00:00:00 2001
From: Ultima1252 <ultima1252@gmail.com>
Date: Mon, 15 Jan 2018 17:13:57 -0800
Subject: [PATCH] Update Makefile.am