gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r36955 - libmicrohttpd/src/testcurl/https


From: gnunet
Subject: [GNUnet-SVN] r36955 - libmicrohttpd/src/testcurl/https
Date: Sat, 26 Mar 2016 01:38:27 +0100

Author: Karlson2k
Date: 2016-03-26 01:38:26 +0100 (Sat, 26 Mar 2016)
New Revision: 36955

Modified:
   libmicrohttpd/src/testcurl/https/test_empty_response.c
   libmicrohttpd/src/testcurl/https/test_https_get_select.c
Log:
Fix testsuite compiler warnings on W32

Modified: libmicrohttpd/src/testcurl/https/test_empty_response.c
===================================================================
--- libmicrohttpd/src/testcurl/https/test_empty_response.c      2016-03-25 
03:33:09 UTC (rev 36954)
+++ libmicrohttpd/src/testcurl/https/test_empty_response.c      2016-03-26 
00:38:26 UTC (rev 36955)
@@ -70,7 +70,7 @@
   fd_set rs;
   fd_set ws;
   fd_set es;
-  MHD_socket max;
+  int maxposixs; /* Max socket number unused on W32 */
   int running;
   struct CURLMsg *msg;
   time_t start;
@@ -134,11 +134,11 @@
   start = time (NULL);
   while ((time (NULL) - start < 5) && (multi != NULL))
     {
-      max = 0;
+      maxposixs = -1;
       FD_ZERO (&rs);
       FD_ZERO (&ws);
       FD_ZERO (&es);
-      mret = curl_multi_fdset (multi, &rs, &ws, &es, &max);
+      mret = curl_multi_fdset (multi, &rs, &ws, &es, &maxposixs);
       if (mret != CURLM_OK)
         {
           curl_multi_remove_handle (multi, c);
@@ -149,7 +149,7 @@
         }
       tv.tv_sec = 0;
       tv.tv_usec = 1000;
-      select (max + 1, &rs, &ws, &es, &tv);
+      select (maxposixs + 1, &rs, &ws, &es, &tv);
       curl_multi_perform (multi, &running);
       if (running == 0)
         {

Modified: libmicrohttpd/src/testcurl/https/test_https_get_select.c
===================================================================
--- libmicrohttpd/src/testcurl/https/test_https_get_select.c    2016-03-25 
03:33:09 UTC (rev 36954)
+++ libmicrohttpd/src/testcurl/https/test_https_get_select.c    2016-03-26 
00:38:26 UTC (rev 36955)
@@ -84,7 +84,12 @@
   fd_set rs;
   fd_set ws;
   fd_set es;
-  MHD_socket max;
+  MHD_socket maxsock;
+#ifdef MHD_WINSOCK_SOCKETS
+  int maxposixs; /* Max socket number unused on W32 */
+#else  /* MHD_POSIX_SOCKETS */
+#define maxposixs maxsock
+#endif /* MHD_POSIX_SOCKETS */
   int running;
   struct CURLMsg *msg;
   time_t start;
@@ -146,11 +151,12 @@
   start = time (NULL);
   while ((time (NULL) - start < 5) && (multi != NULL))
     {
-      max = 0;
+      maxsock = MHD_INVALID_SOCKET;
+      maxposixs = -1;
       FD_ZERO (&rs);
       FD_ZERO (&ws);
       FD_ZERO (&es);
-      mret = curl_multi_fdset (multi, &rs, &ws, &es, &max);
+      mret = curl_multi_fdset (multi, &rs, &ws, &es, &maxposixs);
       if (mret != CURLM_OK)
         {
           curl_multi_remove_handle (multi, c);
@@ -159,7 +165,7 @@
           MHD_stop_daemon (d);
           return 2048;
         }
-      if (MHD_YES != MHD_get_fdset (d, &rs, &ws, &es, &max))
+      if (MHD_YES != MHD_get_fdset (d, &rs, &ws, &es, &maxsock))
         {
           curl_multi_remove_handle (multi, c);
           curl_multi_cleanup (multi);
@@ -169,7 +175,7 @@
         }
       tv.tv_sec = 0;
       tv.tv_usec = 1000;
-      select (max + 1, &rs, &ws, &es, &tv);
+      select (maxposixs + 1, &rs, &ws, &es, &tv);
       curl_multi_perform (multi, &running);
       if (running == 0)
         {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]