aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_get.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/test_get.c')
-rw-r--r--src/testcurl/test_get.c72
1 files changed, 30 insertions, 42 deletions
diff --git a/src/testcurl/test_get.c b/src/testcurl/test_get.c
index 4f4a0944..081859f7 100644
--- a/src/testcurl/test_get.c
+++ b/src/testcurl/test_get.c
@@ -119,14 +119,12 @@ testInternalGet (int poll_flag)
119 struct CBC cbc; 119 struct CBC cbc;
120 CURLcode errornum; 120 CURLcode errornum;
121 121
122 if (0 == global_port) 122 if ( (0 == global_port) &&
123 (MHD_NO == MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) )
123 { 124 {
124 if (MHD_NO == MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 125 global_port = 1220;
125 { 126 if (oneone)
126 global_port = 1220; 127 global_port += 20;
127 if (oneone)
128 global_port += 20;
129 }
130 } 128 }
131 129
132 cbc.buf = buf; 130 cbc.buf = buf;
@@ -188,14 +186,12 @@ testMultithreadedGet (int poll_flag)
188 struct CBC cbc; 186 struct CBC cbc;
189 CURLcode errornum; 187 CURLcode errornum;
190 188
191 if (0 == global_port) 189 if ( (0 == global_port) &&
190 (MHD_NO == MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) )
192 { 191 {
193 if (MHD_NO == MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 192 global_port = 1221;
194 { 193 if (oneone)
195 global_port = 1221; 194 global_port += 20;
196 if (oneone)
197 global_port += 20;
198 }
199 } 195 }
200 196
201 cbc.buf = buf; 197 cbc.buf = buf;
@@ -257,14 +253,12 @@ testMultithreadedPoolGet (int poll_flag)
257 struct CBC cbc; 253 struct CBC cbc;
258 CURLcode errornum; 254 CURLcode errornum;
259 255
260 if (0 == global_port) 256 if ( (0 == global_port) &&
257 (MHD_NO == MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) )
261 { 258 {
262 if (MHD_NO == MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 259 global_port = 1222;
263 { 260 if (oneone)
264 global_port = 1222; 261 global_port += 20;
265 if (oneone)
266 global_port += 20;
267 }
268 } 262 }
269 263
270 cbc.buf = buf; 264 cbc.buf = buf;
@@ -341,14 +335,12 @@ testExternalGet ()
341 time_t start; 335 time_t start;
342 struct timeval tv; 336 struct timeval tv;
343 337
344 if (0 == global_port) 338 if ( (0 == global_port) &&
339 (MHD_NO == MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) )
345 { 340 {
346 if (MHD_NO == MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 341 global_port = 1223;
347 { 342 if (oneone)
348 global_port = 1223; 343 global_port += 20;
349 if (oneone)
350 global_port += 20;
351 }
352 } 344 }
353 345
354 multi = NULL; 346 multi = NULL;
@@ -567,14 +559,12 @@ testStopRace (int poll_flag)
567 MHD_socket fd; 559 MHD_socket fd;
568 struct MHD_Daemon *d; 560 struct MHD_Daemon *d;
569 561
570 if (0 == global_port) 562 if ( (0 == global_port) &&
563 (MHD_NO == MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) )
571 { 564 {
572 if (MHD_NO == MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 565 global_port = 1224;
573 { 566 if (oneone)
574 global_port = 1224; 567 global_port += 20;
575 if (oneone)
576 global_port += 20;
577 }
578 } 568 }
579 569
580 d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG | poll_flag, 570 d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION | MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG | poll_flag,
@@ -682,14 +672,12 @@ testEmptyGet (int poll_flag)
682 CURLcode errornum; 672 CURLcode errornum;
683 int excess_found = 0; 673 int excess_found = 0;
684 674
685 if (0 == global_port) 675 if ( (0 == global_port) &&
676 (MHD_NO == MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) )
686 { 677 {
687 if (MHD_NO == MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 678 global_port = 1225;
688 { 679 if (oneone)
689 global_port = 1225; 680 global_port += 20;
690 if (oneone)
691 global_port += 20;
692 }
693 } 681 }
694 682
695 cbc.buf = buf; 683 cbc.buf = buf;