aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-12 21:53:46 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-12 21:53:46 +0000
commit062f2ca0e539d73f5b3aec652fa0decafebfda2a (patch)
tree301d697fe29d62f9399fb9fe1704b1efc6e2e2d6 /channels
parentfd0b87519d2d874926c8ab2e661aa9debb643dfe (diff)
Change AST_SCHED_DEL use to ast_sched_del for autocongestion in chan_sip.
The scheduler callback will always return 0. This means that this id is never rescheduled, so it makes no sense to loop trying to delete the id from the scheduler queue. If we fail to remove the item from the queue once, it will fail every single time. (Yes I realize that in this case, the macro would exit early because the id is set to -1 in the callback, but it still makes no sense to use that macro in favor of calling ast_sched_del once and being done with it) This is the first of potentially several such fixes. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@108288 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index cf8a78e94..9e3b89760 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -3019,7 +3019,7 @@ static int sip_call(struct ast_channel *ast, char *dest, int timeout)
p->invitestate = INV_CALLING;
/* Initialize auto-congest time */
- AST_SCHED_DEL(sched, p->initid);
+ ast_sched_del(sched, p->initid);
p->initid = ast_sched_add(sched, p->maxtime ? (p->maxtime * 4) : SIP_TRANS_TIMEOUT, auto_congest, p);
}
}
@@ -3092,7 +3092,7 @@ static void __sip_destroy(struct sip_pvt *p, int lockowner)
if (p->stateid > -1)
ast_extension_state_del(p->stateid, NULL);
- AST_SCHED_DEL(sched, p->initid);
+ ast_sched_del(sched, p->initid);
AST_SCHED_DEL(sched, p->waitid);
AST_SCHED_DEL(sched, p->autokillid);
@@ -12045,7 +12045,7 @@ static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, stru
/* Acknowledge sequence number - This only happens on INVITE from SIP-call */
/* Don't auto congest anymore since we've gotten something useful back */
- AST_SCHED_DEL(sched, p->initid);
+ ast_sched_del(sched, p->initid);
/* RFC3261 says we must treat every 1xx response (but not 100)
that we don't recognize as if it was 183.