[asterisk-commits] rizzo: branch rizzo/astobj2 r47791 -
/team/rizzo/astobj2/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Nov 17 06:31:29 MST 2006
Author: rizzo
Date: Fri Nov 17 07:31:28 2006
New Revision: 47791
URL: http://svn.digium.com/view/asterisk?view=rev&rev=47791
Log:
reset the timeout id after destruction.
I got a couple of panics trying to destroy a nonexistent timeout,
not sure which one triggered it.
Modified:
team/rizzo/astobj2/channels/chan_sip.c
Modified: team/rizzo/astobj2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/channels/chan_sip.c?view=diff&rev=47791&r1=47790&r2=47791
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Fri Nov 17 07:31:28 2006
@@ -2657,7 +2657,7 @@
if (peer->expire > -1) {
ast_sched_del(sched, peer->expire);
}
- peer->expire = ast_sched_add(sched, (global_rtautoclear) * 1000, expire_register, (void *)peer);
+ peer->expire = ast_sched_add(sched, global_rtautoclear * 1000, expire_register, peer);
}
ASTOBJ_CONTAINER_LINK(&peerl,peer);
} else {
@@ -3041,7 +3041,7 @@
transmit_invite(p, SIP_INVITE, 1, 2);
/* Initialize auto-congest time */
- p->initid = ast_sched_add(sched, SIP_TRANS_TIMEOUT, auto_congest, p);
+ p->initid = ast_sched_add(sched, SIP_TRANS_TIMEOUT, auto_congest, p); /* XXX pvt_ref ? */
}
return res;
}
@@ -12296,6 +12296,7 @@
if (global_regattempts_max)
p->registry->regattempts = global_regattempts_max+1;
ast_sched_del(sched, r->timeout);
+ r->timeout = -1;
set_destroy(p);
break;
case 404: /* Not found */
@@ -12306,6 +12307,7 @@
if (r->register_pvt) /* XXX are we sure about destroy ? */
r->register_pvt = sip_destroy(r->register_pvt);
ast_sched_del(sched, r->timeout);
+ r->timeout = -1;
break;
case 407: /* Proxy auth */
if (p->authtries == MAX_AUTHTRIES || do_register_auth(p, req, resp)) {
@@ -12340,6 +12342,7 @@
if (r->register_pvt) /* XXX are we sure about destroy ? */
r->register_pvt = sip_destroy(r->register_pvt);
ast_sched_del(sched, r->timeout);
+ r->timeout = -1;
break;
case 200: /* 200 OK */
if (!r) {
@@ -12371,6 +12374,7 @@
/* figure out how long we got registered for */
if (r->expire > -1)
ast_sched_del(sched, r->expire);
+ r->expire = -1;
/* according to section 6.13 of RFC, contact headers override
expires headers, so check those first */
expires = 0;
@@ -12461,6 +12465,7 @@
if (peer->pokeexpire > -1)
ast_sched_del(sched, peer->pokeexpire);
+ peer->pokeexpire = -1;
set_destroy(p);
/* Try again eventually */
More information about the asterisk-commits
mailing list