aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_put_chunked.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/test_put_chunked.c')
-rw-r--r--src/testcurl/test_put_chunked.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/testcurl/test_put_chunked.c b/src/testcurl/test_put_chunked.c
index 3b60ef32..a20ea3c8 100644
--- a/src/testcurl/test_put_chunked.c
+++ b/src/testcurl/test_put_chunked.c
@@ -311,7 +311,12 @@ testExternalPut ()
311 fd_set rs; 311 fd_set rs;
312 fd_set ws; 312 fd_set ws;
313 fd_set es; 313 fd_set es;
314 MHD_socket max; 314 MHD_socket maxsock;
315#ifdef MHD_WINSOCK_SOCKETS
316 int maxposixs; /* Max socket number unused on W32 */
317#else /* MHD_POSIX_SOCKETS */
318#define maxposixs maxsock
319#endif /* MHD_POSIX_SOCKETS */
315 int running; 320 int running;
316 struct CURLMsg *msg; 321 struct CURLMsg *msg;
317 time_t start; 322 time_t start;
@@ -367,12 +372,13 @@ testExternalPut ()
367 start = time (NULL); 372 start = time (NULL);
368 while ((time (NULL) - start < 5) && (multi != NULL)) 373 while ((time (NULL) - start < 5) && (multi != NULL))
369 { 374 {
370 max = 0; 375 maxsock = MHD_INVALID_SOCKET;
376 maxposixs = -1;
371 FD_ZERO (&rs); 377 FD_ZERO (&rs);
372 FD_ZERO (&ws); 378 FD_ZERO (&ws);
373 FD_ZERO (&es); 379 FD_ZERO (&es);
374 curl_multi_perform (multi, &running); 380 curl_multi_perform (multi, &running);
375 mret = curl_multi_fdset (multi, &rs, &ws, &es, &max); 381 mret = curl_multi_fdset (multi, &rs, &ws, &es, &maxposixs);
376 if (mret != CURLM_OK) 382 if (mret != CURLM_OK)
377 { 383 {
378 curl_multi_remove_handle (multi, c); 384 curl_multi_remove_handle (multi, c);
@@ -381,7 +387,7 @@ testExternalPut ()
381 MHD_stop_daemon (d); 387 MHD_stop_daemon (d);
382 return 2048; 388 return 2048;
383 } 389 }
384 if (MHD_YES != MHD_get_fdset (d, &rs, &ws, &es, &max)) 390 if (MHD_YES != MHD_get_fdset (d, &rs, &ws, &es, &maxsock))
385 { 391 {
386 curl_multi_remove_handle (multi, c); 392 curl_multi_remove_handle (multi, c);
387 curl_multi_cleanup (multi); 393 curl_multi_cleanup (multi);
@@ -391,7 +397,7 @@ testExternalPut ()
391 } 397 }
392 tv.tv_sec = 0; 398 tv.tv_sec = 0;
393 tv.tv_usec = 1000; 399 tv.tv_usec = 1000;
394 select (max + 1, &rs, &ws, &es, &tv); 400 select (maxposixs + 1, &rs, &ws, &es, &tv);
395 curl_multi_perform (multi, &running); 401 curl_multi_perform (multi, &running);
396 if (running == 0) 402 if (running == 0)
397 { 403 {