[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.
- [libmicrohttpd] branch master updated (376afc84 -> 0ea5d514), gnunet, 2022/01/15
- [libmicrohttpd] 02/09: test_upgrade: don't fail with particular sockets errors, gnunet, 2022/01/15
- [libmicrohttpd] 03/09: test_upgrade: fail if connection is closed when it shouldn't, gnunet, 2022/01/15
- [libmicrohttpd] 01/09: test_upgrade: replaced a few left abort() with meaningful descriptions, gnunet, 2022/01/15
- [libmicrohttpd] 05/09: test_upgrade: minor code refactoring,
gnunet <=
- [libmicrohttpd] 09/09: test_upgrade{, _large}: used the same port for all checks., gnunet, 2022/01/15
- [libmicrohttpd] 06/09: test_upgrade: added missing fflush(), gnunet, 2022/01/15
- [libmicrohttpd] 04/09: test_upgrade: use 'volatile' for variable with multithread access, gnunet, 2022/01/15
- [libmicrohttpd] 07/09: test_upgrade_large: applied fixes and improvements from test_upgrade, gnunet, 2022/01/15
- [libmicrohttpd] 08/09: test_upgrade{,_large}: simplified stdout,stderr flushing, gnunet, 2022/01/15