[asterisk-commits] oej: trunk r47844 - in /trunk: ./
channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Nov 20 04:36:45 MST 2006
Author: oej
Date: Mon Nov 20 05:36:45 2006
New Revision: 47844
URL: http://svn.digium.com/view/asterisk?view=rev&rev=47844
Log:
Properly reset schedule items (rizzo)
Modified:
trunk/ (props changed)
trunk/channels/chan_sip.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=47844&r1=47843&r2=47844
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Nov 20 05:36:45 2006
@@ -2095,6 +2095,7 @@
if (sipdebug && option_debug > 3)
ast_log(LOG_DEBUG, "** SIP TIMER: Cancelling retransmit of packet (reply received) Retransid #%d\n", cur->retransid);
ast_sched_del(sched, cur->retransid);
+ cur->retransid = -1;
}
UNLINK(cur, p->packets, prev);
free(cur);
@@ -2139,8 +2140,8 @@
if (option_debug > 3 && sipdebug)
ast_log(LOG_DEBUG, "*** SIP TIMER: Cancelling retransmission #%d - %s (got response)\n", cur->retransid, sip_methods[sipmethod].text);
ast_sched_del(sched, cur->retransid);
+ cur->retransid = -1;
}
- cur->retransid = -1;
res = 0;
break;
}
@@ -2458,6 +2459,7 @@
}
if (peer->expire > -1)
ast_sched_del(sched, peer->expire);
+
if (peer->pokeexpire > -1)
ast_sched_del(sched, peer->pokeexpire);
register_peer_exten(peer, FALSE);
@@ -7818,8 +7820,10 @@
else
peer->username[0] = '\0';
- if (peer->expire > -1)
+ if (peer->expire > -1) {
ast_sched_del(sched, peer->expire);
+ peer->expire = -1;
+ }
if (expiry > max_expiry)
expiry = max_expiry;
if (expiry < min_expiry)
@@ -12003,6 +12007,7 @@
if (global_regattempts_max)
p->registry->regattempts = global_regattempts_max+1;
ast_sched_del(sched, r->timeout);
+ r->timeout = -1;
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
break;
case 404: /* Not found */
@@ -12012,6 +12017,7 @@
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
r->call = NULL;
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)) {
@@ -12045,6 +12051,7 @@
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
r->call = NULL;
ast_sched_del(sched, r->timeout);
+ r->timeout = -1;
break;
case 200: /* 200 OK */
if (!r) {
More information about the asterisk-commits
mailing list