[Freeswitch-svn] [commit] r12018 - in freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua: soa sresolv su

FreeSWITCH SVN mrene at freeswitch.org
Sat Feb 14 15:18:53 PST 2009


Author: mrene
Date: Sat Feb 14 17:18:53 2009
New Revision: 12018

Log:
Fix sofia build on non-ipv6 hosts

Modified:
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/soa.c
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_sip.c
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_localinfo.c

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/soa.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/soa.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/soa/soa.c	Sat Feb 14 17:18:53 2009
@@ -2526,9 +2526,9 @@
 	  break;
 	else if (!li6)
 	  li6 = li;		/* Best IP6 address */
-      }
+      } else
 #endif
-      else if (li->li_family == AF_INET) {
+       if (li->li_family == AF_INET) {
 	if (ip4 >= ip6)
 	  break;
 	else if (!li4)

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_sip.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_sip.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_sip.c	Sat Feb 14 17:18:53 2009
@@ -1526,7 +1526,6 @@
   char const *target = srs->srs_target;
   su_addrinfo_t ai[1];
   su_sockaddr_t su[1];
-  char buffer[64];
   int i;
 
   memset(ai, 0, (sizeof ai));
@@ -1551,6 +1550,7 @@
     }
   }
   else if (host_is_ip6_reference(target)) {
+    char buffer[64];
     size_t len = strlen(target) - 2;
 
     ai->ai_addr = memset(su, 0, (sizeof su->su_sin6));

Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_localinfo.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_localinfo.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/su/su_localinfo.c	Sat Feb 14 17:18:53 2009
@@ -96,7 +96,10 @@
 #endif
 
 static int li_scope4(uint32_t ip4);
+
+#ifdef SU_HAVE_IN6
 static int li_scope6(struct in6_addr const *ip6);
+#endif
 
 #if !SU_LOCALINFO_TEST
 



More information about the Freeswitch-svn mailing list