From 5d09bf4a5bddc43f16b58977aa5396078bc575d0 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 27 May 2008 00:17:34 +0000 Subject: [PATCH] Mon May 26 08:31:50 EDT 2008 Pekka Pessi * su_wait.c: fix build on win32 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8674 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/sofia-sip/.update | 2 +- libs/sofia-sip/libsofia-sip-ua/su/su_wait.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index 3ec79f123f..adabeedfcd 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Sun May 25 11:24:02 EDT 2008 +Mon May 26 20:15:12 EDT 2008 diff --git a/libs/sofia-sip/libsofia-sip-ua/su/su_wait.c b/libs/sofia-sip/libsofia-sip-ua/su/su_wait.c index 57643ddc3e..8bb9a03f3c 100644 --- a/libs/sofia-sip/libsofia-sip-ua/su/su_wait.c +++ b/libs/sofia-sip/libsofia-sip-ua/su/su_wait.c @@ -185,13 +185,18 @@ int su_wait_create(su_wait_t *newwait, su_socket_t socket, int events) int su_wait_destroy(su_wait_t *waitobj) { #if SU_HAVE_WINSOCK + su_wait_t w0 = NULL; assert(waitobj != NULL); - if (*waitobj) + if (*waitobj) { WSACloseEvent(*waitobj); + *waitobj = w0; + } #else su_wait_t w0 = { INVALID_SOCKET, 0, 0 }; assert(waitobj != NULL); - *waitobj = w0; + if (waitobj) { + *waitobj = w0; + } #endif return waitobj ? 0 : -1; }