From 36a68f792e243aa5095a202da2f68ef3f678db48 Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Tue, 31 Mar 2009 20:55:47 +0000 Subject: [PATCH] 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 --- channels/chan_sip.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; } -- 2.47.2