[asterisk-commits] bebuild: tag 10.3.0-rc2 r358429 - in /tags/10.3.0-rc2: ./ main/acl.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Mar 6 14:51:54 CST 2012


Author: bebuild
Date: Tue Mar  6 14:51:52 2012
New Revision: 358429

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=358429
Log:
Merge 357067

Modified:
    tags/10.3.0-rc2/   (props changed)
    tags/10.3.0-rc2/main/acl.c

Propchange: tags/10.3.0-rc2/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Propchange: tags/10.3.0-rc2/
------------------------------------------------------------------------------
    svn:mergeinfo = /branches/10:357667

Modified: tags/10.3.0-rc2/main/acl.c
URL: http://svnview.digium.com/svn/asterisk/tags/10.3.0-rc2/main/acl.c?view=diff&rev=358429&r1=358428&r2=358429
==============================================================================
--- tags/10.3.0-rc2/main/acl.c (original)
+++ tags/10.3.0-rc2/main/acl.c Tue Mar  6 14:51:52 2012
@@ -737,6 +737,7 @@
 {
 	char ourhost[MAXHOSTNAMELEN] = "";
 	struct ast_sockaddr root;
+	int res, port = ast_sockaddr_port(ourip);
 
 	/* just use the bind address if it is nonzero */
 	if (!ast_sockaddr_is_any(bindaddr)) {
@@ -749,6 +750,8 @@
 		ast_log(LOG_WARNING, "Unable to get hostname\n");
 	} else {
 		if (resolve_first(ourip, ourhost, PARSE_PORT_FORBID, family) == 0) {
+			/* reset port since resolve_first wipes this out */
+			ast_sockaddr_set_port(ourip, port);
 			return 0;
 		}
 	}
@@ -756,8 +759,12 @@
 	/* A.ROOT-SERVERS.NET. */
 	if (!resolve_first(&root, "A.ROOT-SERVERS.NET", PARSE_PORT_FORBID, 0) &&
 	    !ast_ouraddrfor(&root, ourip)) {
+		/* reset port since resolve_first wipes this out */
+		ast_sockaddr_set_port(ourip, port);
 		return 0;
 	}
-	return get_local_address(ourip);
-}
-
+	res = get_local_address(ourip);
+	ast_sockaddr_set_port(ourip, port);
+	return res;
+}
+




More information about the asterisk-commits mailing list