diff options
Diffstat (limited to 'src/testcurl/test_get_close_keep_alive.c')
-rw-r--r-- | src/testcurl/test_get_close_keep_alive.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/testcurl/test_get_close_keep_alive.c b/src/testcurl/test_get_close_keep_alive.c index 7857f2ad..ef020833 100644 --- a/src/testcurl/test_get_close_keep_alive.c +++ b/src/testcurl/test_get_close_keep_alive.c | |||
@@ -315,14 +315,14 @@ ahc_echo (void *cls, | |||
315 | void **req_cls) | 315 | void **req_cls) |
316 | { | 316 | { |
317 | static int ptr; | 317 | static int ptr; |
318 | const char *me = cls; | ||
319 | struct MHD_Response *response; | 318 | struct MHD_Response *response; |
320 | enum MHD_Result ret; | 319 | enum MHD_Result ret; |
320 | (void) cls; | ||
321 | (void) version; | 321 | (void) version; |
322 | (void) upload_data; | 322 | (void) upload_data; |
323 | (void) upload_data_size; /* Unused. Silence compiler warning. */ | 323 | (void) upload_data_size; /* Unused. Silence compiler warning. */ |
324 | 324 | ||
325 | if (0 != strcmp (me, method)) | 325 | if (0 != strcmp (MHD_HTTP_METHOD_GET, method)) |
326 | return MHD_NO; /* unexpected method */ | 326 | return MHD_NO; /* unexpected method */ |
327 | if (&ptr != *req_cls) | 327 | if (&ptr != *req_cls) |
328 | { | 328 | { |
@@ -333,9 +333,8 @@ ahc_echo (void *cls, | |||
333 | if (slow_reply) | 333 | if (slow_reply) |
334 | usleep (200000); | 334 | usleep (200000); |
335 | 335 | ||
336 | response = MHD_create_response_from_buffer (strlen (url), | 336 | response = MHD_create_response_from_buffer_copy (strlen (url), |
337 | (void *) url, | 337 | (const void *) url); |
338 | MHD_RESPMEM_MUST_COPY); | ||
339 | if (NULL == response) | 338 | if (NULL == response) |
340 | { | 339 | { |
341 | fprintf (stderr, "Failed to create response. Line: %d\n", __LINE__); | 340 | fprintf (stderr, "Failed to create response. Line: %d\n", __LINE__); |
@@ -960,14 +959,14 @@ startTestMhdDaemon (enum testMhdThreadsType thrType, | |||
960 | d = MHD_start_daemon (((int) thrType) | ((int) pollType) | 959 | d = MHD_start_daemon (((int) thrType) | ((int) pollType) |
961 | | MHD_USE_ERROR_LOG, | 960 | | MHD_USE_ERROR_LOG, |
962 | *pport, NULL, NULL, | 961 | *pport, NULL, NULL, |
963 | &ahc_echo, "GET", | 962 | &ahc_echo, NULL, |
964 | MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL, | 963 | MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL, |
965 | MHD_OPTION_END); | 964 | MHD_OPTION_END); |
966 | else | 965 | else |
967 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | ((int) pollType) | 966 | d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | ((int) pollType) |
968 | | MHD_USE_ERROR_LOG, | 967 | | MHD_USE_ERROR_LOG, |
969 | *pport, NULL, NULL, | 968 | *pport, NULL, NULL, |
970 | &ahc_echo, "GET", | 969 | &ahc_echo, NULL, |
971 | MHD_OPTION_THREAD_POOL_SIZE, | 970 | MHD_OPTION_THREAD_POOL_SIZE, |
972 | testNumThreadsForPool (pollType), | 971 | testNumThreadsForPool (pollType), |
973 | MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL, | 972 | MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL, |