[asterisk-commits] dvossel: branch dvossel/gtalk_fixup r291342 - /team/dvossel/gtalk_fixup/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 12 12:58:27 CDT 2010


Author: dvossel
Date: Tue Oct 12 12:58:25 2010
New Revision: 291342

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=291342
Log:
ast_find_ourip experimental tweak

Modified:
    team/dvossel/gtalk_fixup/main/acl.c

Modified: team/dvossel/gtalk_fixup/main/acl.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/gtalk_fixup/main/acl.c?view=diff&rev=291342&r1=291341&r2=291342
==============================================================================
--- team/dvossel/gtalk_fixup/main/acl.c (original)
+++ team/dvossel/gtalk_fixup/main/acl.c Tue Oct 12 12:58:25 2010
@@ -731,6 +731,14 @@
 		ast_debug(3, "Attached to given IP address\n");
 		return 0;
 	}
+
+	ast_debug(3, "Trying to check A.ROOT-SERVERS.NET and get our IP address for that connection\n");
+	/* A.ROOT-SERVERS.NET. */
+	if (!resolve_first(&root, "A.ROOT-SERVERS.NET", PARSE_PORT_FORBID, 0) &&
+	    !ast_ouraddrfor(&root, ourip)) {
+		return 0;
+	}
+
 	/* try to use our hostname */
 	if (gethostname(ourhost, sizeof(ourhost) - 1)) {
 		ast_log(LOG_WARNING, "Unable to get hostname\n");
@@ -739,12 +747,7 @@
 			return 0;
 		}
 	}
-	ast_debug(3, "Trying to check A.ROOT-SERVERS.NET and get our IP address for that connection\n");
-	/* A.ROOT-SERVERS.NET. */
-	if (!resolve_first(&root, "A.ROOT-SERVERS.NET", PARSE_PORT_FORBID, 0) &&
-	    !ast_ouraddrfor(&root, ourip)) {
-		return 0;
-	}
+
 	return get_local_address(ourip);
 }
 




More information about the asterisk-commits mailing list