[Freeswitch-svn] [commit] r5978 - freeswitch/trunk/src

Freeswitch SVN mikej at freeswitch.org
Thu Oct 18 16:15:36 EDT 2007


Author: mikej
Date: Thu Oct 18 16:15:35 2007
New Revision: 5978

Modified:
   freeswitch/trunk/src/switch_utils.c

Log:
fix startup on windows when no ipv6 is present.

Modified: freeswitch/trunk/src/switch_utils.c
==============================================================================
--- freeswitch/trunk/src/switch_utils.c	(original)
+++ freeswitch/trunk/src/switch_utils.c	Thu Oct 18 16:15:35 2007
@@ -258,12 +258,13 @@
 
 	getaddrinfo(base, NULL, NULL, &address_info);
 
-	if (WSAIoctl(tmp_socket,
+	if (!address_info || WSAIoctl(tmp_socket,
 				 SIO_ROUTING_INTERFACE_QUERY,
 				 address_info->ai_addr, (DWORD) address_info->ai_addrlen, &l_address, sizeof(l_address), (LPDWORD) & l_address_len, NULL, NULL)) {
 
 		closesocket(tmp_socket);
-		freeaddrinfo(address_info);
+		if (address_info)
+			freeaddrinfo(address_info);
 		return status;
 	}
 



More information about the Freeswitch-svn mailing list