[Asterisk-cvs] asterisk/channels chan_sip.c,1.638,1.639
markster at lists.digium.com
markster at lists.digium.com
Tue Jan 25 18:09:25 CST 2005
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv32326/channels
Modified Files:
chan_sip.c
Log Message:
Make sure registration is taken care of if DNS fails (bug #3424)
Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.638
retrieving revision 1.639
diff -u -d -r1.638 -r1.639
--- chan_sip.c 25 Jan 2005 06:10:20 -0000 1.638
+++ chan_sip.c 26 Jan 2005 00:11:38 -0000 1.639
@@ -4204,7 +4204,14 @@
}
/* Find address to hostname */
if (create_addr(p,r->hostname)) {
+ /* we have what we hope is a temporary network error,
+ * probably DNS. We need to reschedule a registration try */
sip_destroy(p);
+ if (r->timeout > -1) {
+ ast_log(LOG_WARNING, "Still have a registration timeout (create_addr() error), %d\n", r->timeout);
+ ast_sched_del(sched, r->timeout);
+ }
+ r->timeout = ast_sched_add(sched, global_reg_timeout*1000, sip_reg_timeout, r);
return 0;
}
More information about the svn-commits
mailing list