]> git.ipfire.org Git - thirdparty/bind9.git/commit
Make netmgr initialize and cleanup Winsock itself
authorMichał Kępień <michal@isc.org>
Wed, 2 Dec 2020 21:36:23 +0000 (22:36 +0100)
committerOndřej Surý <ondrej@sury.org>
Wed, 9 Dec 2020 09:46:16 +0000 (10:46 +0100)
commit12fa8a7aedf53f2a42008664bd507116c31d169d
tree24f1e8e4eda748c441e5a848c60cc05b52fec335
parent216fc344908e5d3b900c41a3ed707009adf8b067
Make netmgr initialize and cleanup Winsock itself

On Windows, WSAStartup() needs to be called to initialize Winsock before
any sockets are created or else socket() calls will return error code
10093 (WSANOTINITIALISED).  Since BIND's Network Manager is intended to
work as a reusable networking library, it should take care of calling
WSAStartup() - and its cleanup counterpart, WSACleanup() - itself rather
than relying on external code to do it.  Add the necessary WSAStartup()
and WSACleanup() calls to isc_nm_start() and isc_nm_destroy(),
respectively.

(cherry picked from commit 88f96faba872cfe7006c6de84759515bdf6e9c47)
lib/isc/netmgr/netmgr.c