aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_get_sendfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/test_get_sendfile.c')
-rw-r--r--src/testcurl/test_get_sendfile.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/testcurl/test_get_sendfile.c b/src/testcurl/test_get_sendfile.c
index 9f1f82ae..c483da40 100644
--- a/src/testcurl/test_get_sendfile.c
+++ b/src/testcurl/test_get_sendfile.c
@@ -1,6 +1,7 @@
1/* 1/*
2 This file is part of libmicrohttpd 2 This file is part of libmicrohttpd
3 Copyright (C) 2007, 2009 Christian Grothoff 3 Copyright (C) 2007, 2009 Christian Grothoff
4 Copyright (C) 2014-2021 Evgeny Grin (Karlson2k)
4 5
5 libmicrohttpd is free software; you can redistribute it and/or modify 6 libmicrohttpd is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 7 it under the terms of the GNU General Public License as published
@@ -21,6 +22,7 @@
21 * @file test_get_sendfile.c 22 * @file test_get_sendfile.c
22 * @brief Testcase for libmicrohttpd response from FD 23 * @brief Testcase for libmicrohttpd response from FD
23 * @author Christian Grothoff 24 * @author Christian Grothoff
25 * @author Karlson2k (Evgeny Grin)
24 */ 26 */
25 27
26#include "MHD_config.h" 28#include "MHD_config.h"
@@ -449,14 +451,22 @@ testExternalGet ()
449 { 451 {
450#ifdef MHD_POSIX_SOCKETS 452#ifdef MHD_POSIX_SOCKETS
451 if (EINTR != errno) 453 if (EINTR != errno)
452 abort (); 454 {
455 fprintf (stderr, "Unexpected select() error: %d. Line: %d\n",
456 (int) errno, __LINE__);
457 fflush (stderr);
458 exit (99);
459 }
453#else 460#else
454 if ((WSAEINVAL != WSAGetLastError ()) || (0 != rs.fd_count) || (0 != 461 if ((WSAEINVAL != WSAGetLastError ()) ||
455 ws. 462 (0 != rs.fd_count) || (0 != ws.fd_count) || (0 != es.fd_count) )
456 fd_count) 463 {
457 || (0 != es.fd_count) ) 464 fprintf (stderr, "Unexpected select() error: %d. Line: %d\n",
458 abort (); 465 (int) WSAGetLastError (), __LINE__);
459 Sleep (1000); 466 fflush (stderr);
467 exit (99);
468 }
469 Sleep (1);
460#endif 470#endif
461 } 471 }
462 curl_multi_perform (multi, &running); 472 curl_multi_perform (multi, &running);