gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 05/09: test_upgrade: minor code refactoring


From: gnunet
Subject: [libmicrohttpd] 05/09: test_upgrade: minor code refactoring
Date: Sat, 15 Jan 2022 15:47:45 +0100

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 42d39ec4bfdc2fc5ba18f06a254d9c830539cf41
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sat Jan 15 15:34:04 2022 +0300

    test_upgrade: minor code refactoring
---
 src/microhttpd/test_upgrade.c | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c
index d2e0e536..64b0fc49 100644
--- a/src/microhttpd/test_upgrade.c
+++ b/src/microhttpd/test_upgrade.c
@@ -1,6 +1,7 @@
 /*
      This file is part of libmicrohttpd
-     Copyright (C) 2016 Christian Grothoff
+     Copyright (C) 2016-2020 Christian Grothoff
+     Copyright (C) 2016-2022 Evgeny Grin (Karlson2k)
 
      libmicrohttpd is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -1188,10 +1189,18 @@ run_mhd_epoll_loop (struct MHD_Daemon *daemon)
                   NULL,
                   NULL,
                   &tv);
-    if ( (-1 == ret) &&
-         (EAGAIN != errno) &&
-         (EINTR != errno) )
-      mhdErrorExitDesc ("MHD_get_fdset() failed"); /* TODO: handle errors */
+    if (0 > ret)
+    {
+#ifdef MHD_POSIX_SOCKETS
+      if (EINTR != errno)
+        externalErrorExitDesc ("Unexpected select() error");
+#else
+      if ((WSAEINVAL != WSAGetLastError ()) ||
+          (0 != rs.fd_count) || (0 != ws.fd_count) || (0 != es.fd_count) )
+        externalErrorExitDesc ("Unexpected select() error");
+      Sleep (tv.tv_sec * 1000 + tv.tv_usec / 1000);
+#endif
+    }
     MHD_run (daemon);
   }
 }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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