Ver Fonte

tests: fixed blocking sockets on W32

Sockets on W32 were non-blocking due to copy-paste errors.
Evgeny Grin (Karlson2k) há 4 anos atrás
pai
commit
3b950aef4d
2 ficheiros alterados com 2 adições e 2 exclusões
  1. 1 1
      src/microhttpd/test_upgrade.c
  2. 1 1
      src/microhttpd/test_upgrade_large.c

+ 1 - 1
src/microhttpd/test_upgrade.c

@@ -569,7 +569,7 @@ make_blocking (MHD_socket fd)
     if (-1 == fcntl (fd, F_SETFL, flags & ~O_NONBLOCK))
       abort ();
 #elif defined(MHD_WINSOCK_SOCKETS)
-  unsigned long flags = 1;
+  unsigned long flags = 0;
 
   ioctlsocket (fd, (int) FIONBIO, &flags);
 #endif /* MHD_WINSOCK_SOCKETS */

+ 1 - 1
src/microhttpd/test_upgrade_large.c

@@ -743,7 +743,7 @@ make_blocking (MHD_socket fd)
     if (-1 == fcntl (fd, F_SETFL, flags & ~O_NONBLOCK))
       abort ();
 #elif defined(MHD_WINSOCK_SOCKETS)
-  unsigned long flags = 1;
+  unsigned long flags = 0;
 
   ioctlsocket (fd, (int) FIONBIO, &flags);
 #endif /* MHD_WINSOCK_SOCKETS */