diff options
Diffstat (limited to 'src/daemon/daemontest_put.c')
-rw-r--r-- | src/daemon/daemontest_put.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/daemon/daemontest_put.c b/src/daemon/daemontest_put.c index 00538757..5fcae8b7 100644 --- a/src/daemon/daemontest_put.c +++ b/src/daemon/daemontest_put.c | |||
@@ -77,9 +77,10 @@ static size_t copyBuffer(void * ptr, | |||
77 | } | 77 | } |
78 | 78 | ||
79 | static int ahc_echo(void * cls, | 79 | static int ahc_echo(void * cls, |
80 | struct MHD_Session * session, | 80 | struct MHD_Connection * connection, |
81 | const char * url, | 81 | const char * url, |
82 | const char * method, | 82 | const char * method, |
83 | const char * version, | ||
83 | const char * upload_data, | 84 | const char * upload_data, |
84 | unsigned int * upload_data_size) { | 85 | unsigned int * upload_data_size) { |
85 | int * done = cls; | 86 | int * done = cls; |
@@ -107,7 +108,7 @@ static int ahc_echo(void * cls, | |||
107 | (void*) url, | 108 | (void*) url, |
108 | MHD_NO, | 109 | MHD_NO, |
109 | MHD_YES); | 110 | MHD_YES); |
110 | ret = MHD_queue_response(session, | 111 | ret = MHD_queue_response(connection, |
111 | MHD_HTTP_OK, | 112 | MHD_HTTP_OK, |
112 | response); | 113 | response); |
113 | MHD_destroy_response(response); | 114 | MHD_destroy_response(response); |
@@ -126,12 +127,13 @@ static int testInternalPut() { | |||
126 | cbc.buf = buf; | 127 | cbc.buf = buf; |
127 | cbc.size = 2048; | 128 | cbc.size = 2048; |
128 | cbc.pos = 0; | 129 | cbc.pos = 0; |
129 | d = MHD_start_daemon(MHD_USE_SELECT_INTERNALLY | MHD_USE_IPv4 | MHD_USE_DEBUG, | 130 | d = MHD_start_daemon(MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, |
130 | 1080, | 131 | 1080, |
131 | &apc_all, | 132 | &apc_all, |
132 | NULL, | 133 | NULL, |
133 | &ahc_echo, | 134 | &ahc_echo, |
134 | &done_flag); | 135 | &done_flag, |
136 | MHD_OPTION_END); | ||
135 | if (d == NULL) | 137 | if (d == NULL) |
136 | return 1; | 138 | return 1; |
137 | c = curl_easy_init(); | 139 | c = curl_easy_init(); |
@@ -204,12 +206,13 @@ static int testMultithreadedPut() { | |||
204 | cbc.buf = buf; | 206 | cbc.buf = buf; |
205 | cbc.size = 2048; | 207 | cbc.size = 2048; |
206 | cbc.pos = 0; | 208 | cbc.pos = 0; |
207 | d = MHD_start_daemon(MHD_USE_THREAD_PER_CONNECTION | MHD_USE_IPv4 | MHD_USE_DEBUG, | 209 | d = MHD_start_daemon(MHD_USE_THREAD_PER_CONNECTION | MHD_USE_DEBUG, |
208 | 1081, | 210 | 1081, |
209 | &apc_all, | 211 | &apc_all, |
210 | NULL, | 212 | NULL, |
211 | &ahc_echo, | 213 | &ahc_echo, |
212 | &done_flag); | 214 | &done_flag, |
215 | MHD_OPTION_END); | ||
213 | if (d == NULL) | 216 | if (d == NULL) |
214 | return 16; | 217 | return 16; |
215 | c = curl_easy_init(); | 218 | c = curl_easy_init(); |
@@ -293,12 +296,13 @@ static int testExternalPut() { | |||
293 | cbc.buf = buf; | 296 | cbc.buf = buf; |
294 | cbc.size = 2048; | 297 | cbc.size = 2048; |
295 | cbc.pos = 0; | 298 | cbc.pos = 0; |
296 | d = MHD_start_daemon(MHD_USE_IPv4 | MHD_USE_DEBUG, | 299 | d = MHD_start_daemon(MHD_USE_DEBUG, |
297 | 1082, | 300 | 1082, |
298 | &apc_all, | 301 | &apc_all, |
299 | NULL, | 302 | NULL, |
300 | &ahc_echo, | 303 | &ahc_echo, |
301 | &done_flag); | 304 | &done_flag, |
305 | MHD_OPTION_END); | ||
302 | if (d == NULL) | 306 | if (d == NULL) |
303 | return 256; | 307 | return 256; |
304 | c = curl_easy_init(); | 308 | c = curl_easy_init(); |