[Asterisk-cvs] asterisk/channels chan_sip.c,1.357,1.358
markster at lists.digium.com
markster at lists.digium.com
Sun May 2 13:35:33 CDT 2004
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv16028/channels
Modified Files:
chan_sip.c
Log Message:
On a reload, don't stop supporting sip if we can't find our ip.
Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.357
retrieving revision 1.358
diff -u -d -r1.357 -r1.358
--- chan_sip.c 2 May 2004 16:30:05 -0000 1.357
+++ chan_sip.c 2 May 2004 17:43:15 -0000 1.358
@@ -6899,9 +6899,10 @@
hp = ast_gethostbyname(ourhost, &ahp);
if (!hp) {
ast_log(LOG_WARNING, "Unable to get IP address for %s, SIP disabled\n", ourhost);
- return 0;
- }
- memcpy(&__ourip, hp->h_addr, sizeof(__ourip));
+ if (!__ourip.sin_addr.s_addr)
+ return 0;
+ } else
+ memcpy(&__ourip, hp->h_addr, sizeof(__ourip));
}
if (!ntohs(bindaddr.sin_port))
bindaddr.sin_port = ntohs(DEFAULT_SIP_PORT);
More information about the svn-commits
mailing list