diff options
Diffstat (limited to 'src/testcurl/test_post.c')
-rw-r--r-- | src/testcurl/test_post.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/testcurl/test_post.c b/src/testcurl/test_post.c index f0040140..1102da5a 100644 --- a/src/testcurl/test_post.c +++ b/src/testcurl/test_post.c | |||
@@ -165,7 +165,7 @@ ahc_echo (void *cls, | |||
165 | } | 165 | } |
166 | 166 | ||
167 | 167 | ||
168 | static int | 168 | static unsigned int |
169 | testInternalPost (void) | 169 | testInternalPost (void) |
170 | { | 170 | { |
171 | struct MHD_Daemon *d; | 171 | struct MHD_Daemon *d; |
@@ -173,7 +173,7 @@ testInternalPost (void) | |||
173 | char buf[2048]; | 173 | char buf[2048]; |
174 | struct CBC cbc; | 174 | struct CBC cbc; |
175 | CURLcode errornum; | 175 | CURLcode errornum; |
176 | int port; | 176 | uint16_t port; |
177 | 177 | ||
178 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) | 178 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) |
179 | port = 0; | 179 | port = 0; |
@@ -201,7 +201,7 @@ testInternalPost (void) | |||
201 | { | 201 | { |
202 | MHD_stop_daemon (d); return 32; | 202 | MHD_stop_daemon (d); return 32; |
203 | } | 203 | } |
204 | port = (int) dinfo->port; | 204 | port = dinfo->port; |
205 | } | 205 | } |
206 | c = curl_easy_init (); | 206 | c = curl_easy_init (); |
207 | curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world"); | 207 | curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world"); |
@@ -241,7 +241,7 @@ testInternalPost (void) | |||
241 | } | 241 | } |
242 | 242 | ||
243 | 243 | ||
244 | static int | 244 | static unsigned int |
245 | testMultithreadedPost (void) | 245 | testMultithreadedPost (void) |
246 | { | 246 | { |
247 | struct MHD_Daemon *d; | 247 | struct MHD_Daemon *d; |
@@ -249,7 +249,7 @@ testMultithreadedPost (void) | |||
249 | char buf[2048]; | 249 | char buf[2048]; |
250 | struct CBC cbc; | 250 | struct CBC cbc; |
251 | CURLcode errornum; | 251 | CURLcode errornum; |
252 | int port; | 252 | uint16_t port; |
253 | 253 | ||
254 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) | 254 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) |
255 | port = 0; | 255 | port = 0; |
@@ -278,7 +278,7 @@ testMultithreadedPost (void) | |||
278 | { | 278 | { |
279 | MHD_stop_daemon (d); return 32; | 279 | MHD_stop_daemon (d); return 32; |
280 | } | 280 | } |
281 | port = (int) dinfo->port; | 281 | port = dinfo->port; |
282 | } | 282 | } |
283 | c = curl_easy_init (); | 283 | c = curl_easy_init (); |
284 | curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world"); | 284 | curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world"); |
@@ -318,7 +318,7 @@ testMultithreadedPost (void) | |||
318 | } | 318 | } |
319 | 319 | ||
320 | 320 | ||
321 | static int | 321 | static unsigned int |
322 | testMultithreadedPoolPost (void) | 322 | testMultithreadedPoolPost (void) |
323 | { | 323 | { |
324 | struct MHD_Daemon *d; | 324 | struct MHD_Daemon *d; |
@@ -326,7 +326,7 @@ testMultithreadedPoolPost (void) | |||
326 | char buf[2048]; | 326 | char buf[2048]; |
327 | struct CBC cbc; | 327 | struct CBC cbc; |
328 | CURLcode errornum; | 328 | CURLcode errornum; |
329 | int port; | 329 | uint16_t port; |
330 | 330 | ||
331 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) | 331 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) |
332 | port = 0; | 332 | port = 0; |
@@ -355,7 +355,7 @@ testMultithreadedPoolPost (void) | |||
355 | { | 355 | { |
356 | MHD_stop_daemon (d); return 32; | 356 | MHD_stop_daemon (d); return 32; |
357 | } | 357 | } |
358 | port = (int) dinfo->port; | 358 | port = dinfo->port; |
359 | } | 359 | } |
360 | c = curl_easy_init (); | 360 | c = curl_easy_init (); |
361 | curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world"); | 361 | curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world"); |
@@ -395,7 +395,7 @@ testMultithreadedPoolPost (void) | |||
395 | } | 395 | } |
396 | 396 | ||
397 | 397 | ||
398 | static int | 398 | static unsigned int |
399 | testExternalPost (void) | 399 | testExternalPost (void) |
400 | { | 400 | { |
401 | struct MHD_Daemon *d; | 401 | struct MHD_Daemon *d; |
@@ -417,7 +417,7 @@ testExternalPost (void) | |||
417 | struct CURLMsg *msg; | 417 | struct CURLMsg *msg; |
418 | time_t start; | 418 | time_t start; |
419 | struct timeval tv; | 419 | struct timeval tv; |
420 | int port; | 420 | uint16_t port; |
421 | 421 | ||
422 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) | 422 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) |
423 | port = 0; | 423 | port = 0; |
@@ -446,7 +446,7 @@ testExternalPost (void) | |||
446 | { | 446 | { |
447 | MHD_stop_daemon (d); return 32; | 447 | MHD_stop_daemon (d); return 32; |
448 | } | 448 | } |
449 | port = (int) dinfo->port; | 449 | port = dinfo->port; |
450 | } | 450 | } |
451 | c = curl_easy_init (); | 451 | c = curl_easy_init (); |
452 | curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world"); | 452 | curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world"); |
@@ -666,7 +666,7 @@ slowReadBuffer (void *p, size_t size, size_t nmemb, void *opaque) | |||
666 | #define FLAG_COUNT 16 | 666 | #define FLAG_COUNT 16 |
667 | 667 | ||
668 | 668 | ||
669 | static int | 669 | static unsigned int |
670 | testMultithreadedPostCancelPart (int flags) | 670 | testMultithreadedPostCancelPart (int flags) |
671 | { | 671 | { |
672 | struct MHD_Daemon *d; | 672 | struct MHD_Daemon *d; |
@@ -677,9 +677,9 @@ testMultithreadedPostCancelPart (int flags) | |||
677 | struct curl_slist *headers = NULL; | 677 | struct curl_slist *headers = NULL; |
678 | long response_code; | 678 | long response_code; |
679 | CURLcode cc; | 679 | CURLcode cc; |
680 | int result = 0; | 680 | unsigned int result = 0; |
681 | struct CRBC crbc; | 681 | struct CRBC crbc; |
682 | int port; | 682 | uint16_t port; |
683 | 683 | ||
684 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) | 684 | if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) |
685 | port = 0; | 685 | port = 0; |
@@ -712,7 +712,7 @@ testMultithreadedPostCancelPart (int flags) | |||
712 | { | 712 | { |
713 | MHD_stop_daemon (d); return 32; | 713 | MHD_stop_daemon (d); return 32; |
714 | } | 714 | } |
715 | port = (int) dinfo->port; | 715 | port = dinfo->port; |
716 | } | 716 | } |
717 | 717 | ||
718 | crbc.buffer = "Test content"; | 718 | crbc.buffer = "Test content"; |
@@ -802,10 +802,10 @@ testMultithreadedPostCancelPart (int flags) | |||
802 | } | 802 | } |
803 | 803 | ||
804 | 804 | ||
805 | static int | 805 | static unsigned int |
806 | testMultithreadedPostCancel (void) | 806 | testMultithreadedPostCancel (void) |
807 | { | 807 | { |
808 | int result = 0; | 808 | unsigned int result = 0; |
809 | int flags; | 809 | int flags; |
810 | for (flags = 0; flags < FLAG_COUNT; ++flags) | 810 | for (flags = 0; flags < FLAG_COUNT; ++flags) |
811 | result |= testMultithreadedPostCancelPart (flags); | 811 | result |= testMultithreadedPostCancelPart (flags); |