From: Mark Michelson Date: Tue, 31 Mar 2009 20:55:47 +0000 (+0000) Subject: Use AST_SCHED_DEL_SPINLOCK instead of manually using the logic. X-Git-Tag: 1.4.25-rc1~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36a68f792e243aa5095a202da2f68ef3f678db48;p=thirdparty%2Fasterisk.git Use AST_SCHED_DEL_SPINLOCK instead of manually using the logic. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@185531 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 76aaa2a7d1..4b8bb3730d 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -2215,9 +2215,7 @@ static void __sip_ack(struct sip_pvt *p, int seqno, int resp, int sipmethod) * the packet's retransid will be set to -1. The atomicity of the setting and checking * of the retransid to -1 is ensured since in both cases p's lock is held. */ - while (cur->retransid > -1 && ast_sched_del(sched, cur->retransid)) { - DEADLOCK_AVOIDANCE(&p->lock); - } + AST_SCHED_DEL_SPINLOCK(sched, cur->retransid, &p->lock); free(cur); break; }