aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_add_conn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/test_add_conn.c')
-rw-r--r--src/testcurl/test_add_conn.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/testcurl/test_add_conn.c b/src/testcurl/test_add_conn.c
index 62386657..085d5e69 100644
--- a/src/testcurl/test_add_conn.c
+++ b/src/testcurl/test_add_conn.c
@@ -151,15 +151,15 @@ ahc_echo (void *cls,
151 void **req_cls) 151 void **req_cls)
152{ 152{
153 static int ptr; 153 static int ptr;
154 const char *me = cls;
155 struct MHD_Response *response; 154 struct MHD_Response *response;
156 enum MHD_Result ret; 155 enum MHD_Result ret;
157 const char *v; 156 const char *v;
157 (void) cls;
158 (void) version; 158 (void) version;
159 (void) upload_data; 159 (void) upload_data;
160 (void) upload_data_size; /* Unused. Silence compiler warning. */ 160 (void) upload_data_size; /* Unused. Silence compiler warning. */
161 161
162 if (0 != strcmp (me, method)) 162 if (0 != strcmp (MHD_HTTP_METHOD_GET, method))
163 return MHD_NO; /* unexpected method */ 163 return MHD_NO; /* unexpected method */
164 if (&ptr != *req_cls) 164 if (&ptr != *req_cls)
165 { 165 {
@@ -200,9 +200,8 @@ ahc_echo (void *cls,
200 if (slow_reply) 200 if (slow_reply)
201 usleep (200000); 201 usleep (200000);
202 202
203 response = MHD_create_response_from_buffer (strlen (url), 203 response = MHD_create_response_from_buffer_copy (strlen (url),
204 (void *) url, 204 (const void *) url);
205 MHD_RESPMEM_MUST_COPY);
206 ret = MHD_queue_response (connection, 205 ret = MHD_queue_response (connection,
207 MHD_HTTP_OK, 206 MHD_HTTP_OK,
208 response); 207 response);
@@ -266,7 +265,7 @@ createListeningSocket (int *pport)
266 struct sockaddr_in sin; 265 struct sockaddr_in sin;
267 socklen_t sin_len; 266 socklen_t sin_len;
268#ifdef MHD_POSIX_SOCKETS 267#ifdef MHD_POSIX_SOCKETS
269 static const int on = 1; 268 static int on = 1;
270#endif /* MHD_POSIX_SOCKETS */ 269#endif /* MHD_POSIX_SOCKETS */
271 270
272 skt = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP); 271 skt = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP);
@@ -745,7 +744,7 @@ startTestMhdDaemon (enum testMhdThreadsType thrType,
745 | (no_listen ? MHD_USE_NO_LISTEN_SOCKET : 0) 744 | (no_listen ? MHD_USE_NO_LISTEN_SOCKET : 0)
746 | MHD_USE_ERROR_LOG, 745 | MHD_USE_ERROR_LOG,
747 *pport, NULL, NULL, 746 *pport, NULL, NULL,
748 &ahc_echo, "GET", 747 &ahc_echo, NULL,
749 MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL, 748 MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL,
750 MHD_OPTION_END); 749 MHD_OPTION_END);
751 else 750 else
@@ -754,7 +753,7 @@ startTestMhdDaemon (enum testMhdThreadsType thrType,
754 | (no_listen ? MHD_USE_NO_LISTEN_SOCKET : 0) 753 | (no_listen ? MHD_USE_NO_LISTEN_SOCKET : 0)
755 | MHD_USE_ERROR_LOG, 754 | MHD_USE_ERROR_LOG,
756 *pport, NULL, NULL, 755 *pport, NULL, NULL,
757 &ahc_echo, "GET", 756 &ahc_echo, NULL,
758 MHD_OPTION_THREAD_POOL_SIZE, 757 MHD_OPTION_THREAD_POOL_SIZE,
759 testNumThreadsForPool (pollType), 758 testNumThreadsForPool (pollType),
760 MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL, 759 MHD_OPTION_URI_LOG_CALLBACK, &log_cb, NULL,