aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_quiesce.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/test_quiesce.c')
-rw-r--r--src/testcurl/test_quiesce.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/testcurl/test_quiesce.c b/src/testcurl/test_quiesce.c
index f7703db7..7425f839 100644
--- a/src/testcurl/test_quiesce.c
+++ b/src/testcurl/test_quiesce.c
@@ -251,11 +251,11 @@ ahc_echo (void *cls,
251 void **req_cls) 251 void **req_cls)
252{ 252{
253 static int ptr; 253 static int ptr;
254 const char *me = cls;
255 struct MHD_Response *response; 254 struct MHD_Response *response;
255 (void) cls;
256 (void) version; (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ 256 (void) version; (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */
257 257
258 if (0 != strcmp (me, method)) 258 if (0 != strcmp (MHD_HTTP_METHOD_GET, method))
259 { 259 {
260 fprintf (stderr, "Unexpected HTTP method '%s'. ", method); 260 fprintf (stderr, "Unexpected HTTP method '%s'. ", method);
261 externalErrorExit (); 261 externalErrorExit ();
@@ -266,9 +266,8 @@ ahc_echo (void *cls,
266 return MHD_YES; 266 return MHD_YES;
267 } 267 }
268 *req_cls = NULL; 268 *req_cls = NULL;
269 response = MHD_create_response_from_buffer (strlen (url), 269 response = MHD_create_response_from_buffer_copy (strlen (url),
270 (void *) url, 270 (const void *) url);
271 MHD_RESPMEM_MUST_COPY);
272 if (NULL == response) 271 if (NULL == response)
273 mhdErrorExitDesc ("MHD_create_response failed"); 272 mhdErrorExitDesc ("MHD_create_response failed");
274 /* Make sure that connection will not be reused */ 273 /* Make sure that connection will not be reused */
@@ -317,7 +316,7 @@ ServeOneRequest (void *param)
317 fd = *((MHD_socket *) param); 316 fd = *((MHD_socket *) param);
318 317
319 d = MHD_start_daemon (MHD_USE_ERROR_LOG, 318 d = MHD_start_daemon (MHD_USE_ERROR_LOG,
320 0, NULL, NULL, &ahc_echo, "GET", 319 0, NULL, NULL, &ahc_echo, NULL,
321 MHD_OPTION_LISTEN_SOCKET, fd, 320 MHD_OPTION_LISTEN_SOCKET, fd,
322 MHD_OPTION_NOTIFY_COMPLETED, &request_completed, &done, 321 MHD_OPTION_NOTIFY_COMPLETED, &request_completed, &done,
323 MHD_OPTION_END); 322 MHD_OPTION_END);
@@ -404,7 +403,7 @@ testGet (int type, int pool_count, int poll_flag)
404 struct CBC cbc; 403 struct CBC cbc;
405 MHD_socket fd; 404 MHD_socket fd;
406 pthread_t thrd; 405 pthread_t thrd;
407 const char *thrdRet; 406 char *thrdRet;
408 407
409 if (verbose) 408 if (verbose)
410 printf ("testGet(%d, %d, %d) test started.\n", 409 printf ("testGet(%d, %d, %d) test started.\n",
@@ -416,7 +415,7 @@ testGet (int type, int pool_count, int poll_flag)
416 if (pool_count > 0) 415 if (pool_count > 0)
417 { 416 {
418 d = MHD_start_daemon (type | MHD_USE_ERROR_LOG | MHD_USE_ITC | poll_flag, 417 d = MHD_start_daemon (type | MHD_USE_ERROR_LOG | MHD_USE_ITC | poll_flag,
419 global_port, NULL, NULL, &ahc_echo, "GET", 418 global_port, NULL, NULL, &ahc_echo, NULL,
420 MHD_OPTION_THREAD_POOL_SIZE, 419 MHD_OPTION_THREAD_POOL_SIZE,
421 (unsigned int) pool_count, 420 (unsigned int) pool_count,
422 MHD_OPTION_END); 421 MHD_OPTION_END);
@@ -425,7 +424,7 @@ testGet (int type, int pool_count, int poll_flag)
425 else 424 else
426 { 425 {
427 d = MHD_start_daemon (type | MHD_USE_ERROR_LOG | MHD_USE_ITC | poll_flag, 426 d = MHD_start_daemon (type | MHD_USE_ERROR_LOG | MHD_USE_ITC | poll_flag,
428 global_port, NULL, NULL, &ahc_echo, "GET", 427 global_port, NULL, NULL, &ahc_echo, NULL,
429 MHD_OPTION_END); 428 MHD_OPTION_END);
430 } 429 }
431 if (d == NULL) 430 if (d == NULL)
@@ -555,7 +554,7 @@ testExternalGet (void)
555 d = MHD_start_daemon (MHD_USE_ERROR_LOG, 554 d = MHD_start_daemon (MHD_USE_ERROR_LOG,
556 global_port, 555 global_port,
557 NULL, NULL, 556 NULL, NULL,
558 &ahc_echo, "GET", 557 &ahc_echo, NULL,
559 MHD_OPTION_END); 558 MHD_OPTION_END);
560 if (d == NULL) 559 if (d == NULL)
561 mhdErrorExitDesc ("Failed to start MHD daemon"); 560 mhdErrorExitDesc ("Failed to start MHD daemon");