From 869d0eeb20657cd6d2e87d8c4836b086c6be448d Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 29 Sep 2017 15:27:08 -0700 Subject: Windows UDP support. This implements the basic UDP functionality for Windows (required for ZeroTier for example). We have also introduced a UDP test suite to validate that this actually works. While here a few Windows compilation warnings / nits were fixed. --- src/platform/windows/win_thread.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/platform/windows/win_thread.c') diff --git a/src/platform/windows/win_thread.c b/src/platform/windows/win_thread.c index 12049139..41ba721c 100644 --- a/src/platform/windows/win_thread.c +++ b/src/platform/windows/win_thread.c @@ -154,16 +154,11 @@ nni_plat_init(int (*helper)(void)) AcquireSRWLockExclusive(&lock); if (!plat_inited) { - if ((rv = nni_win_iocp_sysinit()) != 0) { - goto out; - } - if ((rv = nni_win_ipc_sysinit()) != 0) { - goto out; - } - if ((rv = nni_win_tcp_sysinit()) != 0) { - goto out; - } - if ((rv = nni_win_resolv_sysinit()) != 0) { + if (((rv = nni_win_iocp_sysinit()) != 0) || + ((rv = nni_win_ipc_sysinit()) != 0) || + ((rv = nni_win_tcp_sysinit()) != 0) || + ((rv = nni_win_udp_sysinit()) != 0) || + ((rv = nni_win_resolv_sysinit()) != 0)) { goto out; } @@ -182,6 +177,7 @@ nni_plat_fini(void) { nni_win_resolv_sysfini(); nni_win_ipc_sysfini(); + nni_win_udp_sysfini(); nni_win_tcp_sysfini(); nni_win_iocp_sysfini(); WSACleanup(); -- cgit v1.2.3-70-g09d2