[asterisk-commits] dvossel: branch dvossel/gtalk_fixup r291505 - /team/dvossel/gtalk_fixup/chann...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Oct 13 13:50:59 CDT 2010


Author: dvossel
Date: Wed Oct 13 13:50:55 2010
New Revision: 291505

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=291505
Log:
fix crash in update_stun

Modified:
    team/dvossel/gtalk_fixup/channels/chan_gtalk.c

Modified: team/dvossel/gtalk_fixup/channels/chan_gtalk.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/gtalk_fixup/channels/chan_gtalk.c?view=diff&rev=291505&r1=291504&r2=291505
==============================================================================
--- team/dvossel/gtalk_fixup/channels/chan_gtalk.c (original)
+++ team/dvossel/gtalk_fixup/channels/chan_gtalk.c Wed Oct 13 13:50:55 2010
@@ -1406,7 +1406,10 @@
 		char username[256];
 
 		/* Find the IP address of the host */
-		hp = ast_gethostbyname(tmp->ip, &ahp);
+		if (!(hp = ast_gethostbyname(tmp->ip, &ahp))) {
+			ast_log(LOG_WARNING, "Could not get host by name for %s\n", tmp->ip);
+			tmp = tmp->next;
+		}
 		sin.sin_family = AF_INET;
 		memcpy(&sin.sin_addr, hp->h_addr, sizeof(sin.sin_addr));
 		sin.sin_port = htons(tmp->port);




More information about the asterisk-commits mailing list