diff options
Diffstat (limited to 'src/testcurl/perf_get.c')
-rw-r--r-- | src/testcurl/perf_get.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/testcurl/perf_get.c b/src/testcurl/perf_get.c index a9298b2a..825e4778 100644 --- a/src/testcurl/perf_get.c +++ b/src/testcurl/perf_get.c | |||
@@ -166,12 +166,12 @@ ahc_echo (void *cls, | |||
166 | void **req_cls) | 166 | void **req_cls) |
167 | { | 167 | { |
168 | static int ptr; | 168 | static int ptr; |
169 | const char *me = cls; | ||
170 | enum MHD_Result ret; | 169 | enum MHD_Result ret; |
170 | (void) cls; | ||
171 | (void) url; (void) version; /* Unused. Silent compiler warning. */ | 171 | (void) url; (void) version; /* Unused. Silent compiler warning. */ |
172 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 172 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
173 | 173 | ||
174 | if (0 != strcmp (me, method)) | 174 | if (0 != strcmp (MHD_HTTP_METHOD_GET, method)) |
175 | return MHD_NO; /* unexpected method */ | 175 | return MHD_NO; /* unexpected method */ |
176 | if (&ptr != *req_cls) | 176 | if (&ptr != *req_cls) |
177 | { | 177 | { |
@@ -203,8 +203,8 @@ testInternalGet (int port, int poll_flag) | |||
203 | cbc.buf = buf; | 203 | cbc.buf = buf; |
204 | cbc.size = 2048; | 204 | cbc.size = 2048; |
205 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG | 205 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG |
206 | | poll_flag, | 206 | | (enum MHD_FLAG) poll_flag, |
207 | port, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); | 207 | port, NULL, NULL, &ahc_echo, NULL, MHD_OPTION_END); |
208 | if (d == NULL) | 208 | if (d == NULL) |
209 | return 1; | 209 | return 1; |
210 | if (0 == port) | 210 | if (0 == port) |
@@ -282,8 +282,8 @@ testMultithreadedGet (int port, int poll_flag) | |||
282 | cbc.size = 2048; | 282 | cbc.size = 2048; |
283 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | 283 | d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION |
284 | | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG | 284 | | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG |
285 | | poll_flag, | 285 | | (enum MHD_FLAG) poll_flag, |
286 | port, NULL, NULL, &ahc_echo, "GET", MHD_OPTION_END); | 286 | port, NULL, NULL, &ahc_echo, NULL, MHD_OPTION_END); |
287 | if (d == NULL) | 287 | if (d == NULL) |
288 | return 16; | 288 | return 16; |
289 | if (0 == port) | 289 | if (0 == port) |
@@ -363,8 +363,8 @@ testMultithreadedPoolGet (int port, int poll_flag) | |||
363 | cbc.buf = buf; | 363 | cbc.buf = buf; |
364 | cbc.size = 2048; | 364 | cbc.size = 2048; |
365 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG | 365 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG |
366 | | poll_flag, | 366 | | (enum MHD_FLAG) poll_flag, |
367 | port, NULL, NULL, &ahc_echo, "GET", | 367 | port, NULL, NULL, &ahc_echo, NULL, |
368 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, | 368 | MHD_OPTION_THREAD_POOL_SIZE, MHD_CPU_COUNT, |
369 | MHD_OPTION_END); | 369 | MHD_OPTION_END); |
370 | if (d == NULL) | 370 | if (d == NULL) |
@@ -459,7 +459,7 @@ testExternalGet (int port) | |||
459 | cbc.size = 2048; | 459 | cbc.size = 2048; |
460 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, | 460 | d = MHD_start_daemon (MHD_USE_ERROR_LOG, |
461 | port, NULL, NULL, | 461 | port, NULL, NULL, |
462 | &ahc_echo, "GET", | 462 | &ahc_echo, NULL, |
463 | MHD_OPTION_END); | 463 | MHD_OPTION_END); |
464 | if (NULL == d) | 464 | if (NULL == d) |
465 | return 256; | 465 | return 256; |
@@ -638,9 +638,8 @@ main (int argc, char *const *argv) | |||
638 | port += 15; | 638 | port += 15; |
639 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) | 639 | if (0 != curl_global_init (CURL_GLOBAL_WIN32)) |
640 | return 2; | 640 | return 2; |
641 | response = MHD_create_response_from_buffer (strlen ("/hello_world"), | 641 | response = MHD_create_response_from_buffer_copy (strlen ("/hello_world"), |
642 | "/hello_world", | 642 | "/hello_world"); |
643 | MHD_RESPMEM_MUST_COPY); | ||
644 | errorCount += testExternalGet (port++); | 643 | errorCount += testExternalGet (port++); |
645 | if (MHD_YES == MHD_is_feature_supported (MHD_FEATURE_THREADS)) | 644 | if (MHD_YES == MHD_is_feature_supported (MHD_FEATURE_THREADS)) |
646 | { | 645 | { |