[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 02/02: Simplified deinit on W32.
From: |
gnunet |
Subject: |
[libmicrohttpd] 02/02: Simplified deinit on W32. |
Date: |
Thu, 07 Sep 2023 16:53:46 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit dfbc4da6df383261b11e3e4a039b76ddda1136fd
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Thu Sep 7 17:53:38 2023 +0300
Simplified deinit on W32.
---
src/microhttpd/daemon.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 7db67cd0..4694afeb 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -131,14 +131,6 @@ MHD_epoll (struct MHD_Daemon *daemon,
#endif /* EPOLL_SUPPORT */
-
-#if defined(MHD_WINSOCK_SOCKETS)
-/**
- * Track initialization of winsock
- */
-static int mhd_winsock_inited_ = 0;
-#endif /* MHD_WINSOCK_SOCKETS */
-
#ifdef _AUTOINIT_FUNCS_ARE_SUPPORTED
/**
* Do nothing - global initialisation is
@@ -8959,7 +8951,6 @@ MHD_init (void)
#if defined(MHD_WINSOCK_SOCKETS)
if (0 != WSAStartup (MAKEWORD (2, 2), &wsd))
MHD_PANIC (_ ("Failed to initialize winsock.\n"));
- mhd_winsock_inited_ = 1;
if ((2 != LOBYTE (wsd.wVersion)) && (2 != HIBYTE (wsd.wVersion)))
MHD_PANIC (_ ("Winsock version 2.2 is not available.\n"));
#endif /* MHD_WINSOCK_SOCKETS */
@@ -9008,8 +8999,7 @@ MHD_fini (void)
gnutls_global_deinit ();
#endif /* HTTPS_SUPPORT */
#if defined(MHD_WINSOCK_SOCKETS)
- if (mhd_winsock_inited_)
- WSACleanup ();
+ WSACleanup ();
#endif /* MHD_WINSOCK_SOCKETS */
MHD_monotonic_sec_counter_finish ();
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.