aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_get_response_cleanup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/test_get_response_cleanup.c')
-rw-r--r--src/testcurl/test_get_response_cleanup.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/testcurl/test_get_response_cleanup.c b/src/testcurl/test_get_response_cleanup.c
index dee0806c..442f9f25 100644
--- a/src/testcurl/test_get_response_cleanup.c
+++ b/src/testcurl/test_get_response_cleanup.c
@@ -152,12 +152,12 @@ ahc_echo (void *cls,
152} 152}
153 153
154 154
155static int 155static unsigned int
156testInternalGet (void) 156testInternalGet (void)
157{ 157{
158 struct MHD_Daemon *d; 158 struct MHD_Daemon *d;
159 pid_t curl; 159 pid_t curl;
160 int port; 160 uint16_t port;
161 char url[127]; 161 char url[127];
162 162
163 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 163 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
@@ -182,12 +182,12 @@ testInternalGet (void)
182 { 182 {
183 MHD_stop_daemon (d); return 32; 183 MHD_stop_daemon (d); return 32;
184 } 184 }
185 port = (int) dinfo->port; 185 port = dinfo->port;
186 } 186 }
187 snprintf (url, 187 snprintf (url,
188 sizeof (url), 188 sizeof (url),
189 "http://127.0.0.1:%d/", 189 "http://127.0.0.1:%u/",
190 port); 190 (unsigned int) port);
191 curl = fork_curl (url); 191 curl = fork_curl (url);
192 (void) sleep (1); 192 (void) sleep (1);
193 kill_curl (curl); 193 kill_curl (curl);
@@ -200,12 +200,12 @@ testInternalGet (void)
200} 200}
201 201
202 202
203static int 203static unsigned int
204testMultithreadedGet (void) 204testMultithreadedGet (void)
205{ 205{
206 struct MHD_Daemon *d; 206 struct MHD_Daemon *d;
207 pid_t curl; 207 pid_t curl;
208 int port; 208 uint16_t port;
209 char url[127]; 209 char url[127];
210 210
211 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 211 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
@@ -233,12 +233,12 @@ testMultithreadedGet (void)
233 { 233 {
234 MHD_stop_daemon (d); return 32; 234 MHD_stop_daemon (d); return 32;
235 } 235 }
236 port = (int) dinfo->port; 236 port = dinfo->port;
237 } 237 }
238 snprintf (url, 238 snprintf (url,
239 sizeof (url), 239 sizeof (url),
240 "http://127.0.0.1:%d/", 240 "http://127.0.0.1:%u/",
241 port); 241 (unsigned int) port);
242 // fprintf (stderr, "Forking cURL!\n"); 242 // fprintf (stderr, "Forking cURL!\n");
243 curl = fork_curl (url); 243 curl = fork_curl (url);
244 (void) sleep (1); 244 (void) sleep (1);
@@ -263,12 +263,12 @@ testMultithreadedGet (void)
263} 263}
264 264
265 265
266static int 266static unsigned int
267testMultithreadedPoolGet (void) 267testMultithreadedPoolGet (void)
268{ 268{
269 struct MHD_Daemon *d; 269 struct MHD_Daemon *d;
270 pid_t curl; 270 pid_t curl;
271 int port; 271 uint16_t port;
272 char url[127]; 272 char url[127];
273 273
274 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 274 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
@@ -295,12 +295,12 @@ testMultithreadedPoolGet (void)
295 { 295 {
296 MHD_stop_daemon (d); return 32; 296 MHD_stop_daemon (d); return 32;
297 } 297 }
298 port = (int) dinfo->port; 298 port = dinfo->port;
299 } 299 }
300 snprintf (url, 300 snprintf (url,
301 sizeof (url), 301 sizeof (url),
302 "http://127.0.0.1:%d/", 302 "http://127.0.0.1:%u/",
303 port); 303 (unsigned int) port);
304 curl = fork_curl (url); 304 curl = fork_curl (url);
305 (void) sleep (1); 305 (void) sleep (1);
306 kill_curl (curl); 306 kill_curl (curl);
@@ -313,7 +313,7 @@ testMultithreadedPoolGet (void)
313} 313}
314 314
315 315
316static int 316static unsigned int
317testExternalGet (void) 317testExternalGet (void)
318{ 318{
319 struct MHD_Daemon *d; 319 struct MHD_Daemon *d;
@@ -324,7 +324,7 @@ testExternalGet (void)
324 time_t start; 324 time_t start;
325 struct timeval tv; 325 struct timeval tv;
326 pid_t curl; 326 pid_t curl;
327 int port; 327 uint16_t port;
328 char url[127]; 328 char url[127];
329 329
330 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 330 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
@@ -349,12 +349,12 @@ testExternalGet (void)
349 { 349 {
350 MHD_stop_daemon (d); return 32; 350 MHD_stop_daemon (d); return 32;
351 } 351 }
352 port = (int) dinfo->port; 352 port = dinfo->port;
353 } 353 }
354 snprintf (url, 354 snprintf (url,
355 sizeof (url), 355 sizeof (url),
356 "http://127.0.0.1:%d/", 356 "http://127.0.0.1:%u/",
357 port); 357 (unsigned int) port);
358 curl = fork_curl (url); 358 curl = fork_curl (url);
359 359
360 start = time (NULL); 360 start = time (NULL);