gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r37067 - libmicrohttpd/src/testcurl


From: gnunet
Subject: [GNUnet-SVN] r37067 - libmicrohttpd/src/testcurl
Date: Sat, 23 Apr 2016 18:16:01 +0200

Author: Karlson2k
Date: 2016-04-23 18:16:01 +0200 (Sat, 23 Apr 2016)
New Revision: 37067

Modified:
   libmicrohttpd/src/testcurl/test_quiesce.c
Log:
test_quiesce: added more checks and more error reports

Modified: libmicrohttpd/src/testcurl/test_quiesce.c
===================================================================
--- libmicrohttpd/src/testcurl/test_quiesce.c   2016-04-23 16:15:58 UTC (rev 
37066)
+++ libmicrohttpd/src/testcurl/test_quiesce.c   2016-04-23 16:16:01 UTC (rev 
37067)
@@ -152,7 +152,7 @@
     }
   MHD_stop_daemon (d);
   MHD_socket_close_(fd);
-  return NULL;
+  return done ? NULL : "Requests was not served by ServeOneRequest()";
 }
 
 
@@ -229,6 +229,14 @@
   }
 
   fd = MHD_quiesce_daemon (d);
+  if (MHD_INVALID_SOCKET == fd)
+    {
+      fprintf (stderr,
+               "MHD_quiesce_daemon failed.\n");
+      curl_easy_cleanup (c);
+      MHD_stop_daemon (d);
+      return 2;
+    }
   if (0 != pthread_create(&thrd, NULL, &ServeOneRequest, (void*)(intptr_t) fd))
     {
       fprintf (stderr, "pthread_create failed\n");
@@ -411,8 +419,16 @@
       if (i == 0) {
         /* quiesce the daemon on the 1st iteration, so the 2nd should fail */
         fd = MHD_quiesce_daemon(d);
-       if (MHD_INVALID_SOCKET == fd)
-         abort ();
+        if (MHD_INVALID_SOCKET == fd)
+          {
+            fprintf (stderr,
+                     "MHD_quiesce_daemon failed.\n");
+            curl_multi_remove_handle (multi, c);
+            curl_multi_cleanup (multi);
+            curl_easy_cleanup (c);
+            MHD_stop_daemon (d);
+            return 2;
+          }
        MHD_socket_close_ (fd);
         c = setupCURL (&cbc);
         multi = curl_multi_init ();




reply via email to

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