[asterisk-commits] qwell: trunk r100139 - in /trunk: ./ main/acl.c res/res_phoneprov.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 24 10:47:11 CST 2008


Author: qwell
Date: Thu Jan 24 10:47:10 2008
New Revision: 100139

URL: http://svn.digium.com/view/asterisk?view=rev&rev=100139
Log:
Merged revisions 100138 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r100138 | qwell | 2008-01-24 10:41:29 -0600 (Thu, 24 Jan 2008) | 6 lines

Fix compilation on Solaris.

(closes issue #11832)
Patches:
      bug-11832.diff uploaded by snuffy (license 35)

........

Modified:
    trunk/   (props changed)
    trunk/main/acl.c
    trunk/res/res_phoneprov.c

Change Statistics:
 0 files changed

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/acl.c
URL: http://svn.digium.com/view/asterisk/trunk/main/acl.c?view=diff&rev=100139&r1=100138&r2=100139
==============================================================================
--- trunk/main/acl.c (original)
+++ trunk/main/acl.c Thu Jan 24 10:47:10 2008
@@ -28,7 +28,6 @@
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
 #include "asterisk/network.h"
-#include <ifaddrs.h>
 
 #if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__Darwin__)
 #include <fcntl.h>
@@ -37,6 +36,9 @@
 
 #if defined(SOLARIS)
 #include <sys/sockio.h>
+#include <net/if.h>
+#else
+#include <ifaddrs.h>
 #endif
 
 #include "asterisk/acl.h"
@@ -118,8 +120,9 @@
 	int rtnerr;
 	const struct sockaddr_in *sin;
 #endif /* BSD_OR_LINUX */
-	struct in_addr best_addr = { 0, };
+	struct in_addr best_addr;
 	int best_score = -100;
+	memset(&best_addr, 0, sizeof(best_addr));
 
 #if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__)
 	rtnerr = getifaddrs(&ifaphead);
@@ -177,7 +180,7 @@
 
 		for (ifr = (struct lifreq *)buf, x = 0; x < ifn.lifn_count; ifr++, x++) {
 			sa = (struct sockaddr_in *)&(ifr->lifr_addr);
-			score_address(sin, &best_addr, &best_score);
+			score_address(sa, &best_addr, &best_score);
 			res = 0;
 
 			if (best_score == 0)

Modified: trunk/res/res_phoneprov.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_phoneprov.c?view=diff&rev=100139&r1=100138&r2=100139
==============================================================================
--- trunk/res/res_phoneprov.c (original)
+++ trunk/res/res_phoneprov.c Thu Jan 24 10:47:10 2008
@@ -31,7 +31,9 @@
 #include <sys/ioctl.h>
 #include <sys/socket.h>
 #include <net/if.h>
-
+#ifdef SOLARIS
+#include <sys/sockio.h>
+#endif
 ASTERISK_FILE_VERSION(__FILE__, "$Revision: 96773 $")
 
 #include "asterisk/file.h"




More information about the asterisk-commits mailing list