]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Use AST_SCHED_DEL_SPINLOCK instead of manually using the logic.
authorMark Michelson <mmichelson@digium.com>
Tue, 31 Mar 2009 20:55:47 +0000 (20:55 +0000)
committerMark Michelson <mmichelson@digium.com>
Tue, 31 Mar 2009 20:55:47 +0000 (20:55 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@185531 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 76aaa2a7d10d12013756a660123603a50faf14d9..4b8bb3730d67b7fe1cafacf80838ac18544ef375 100644 (file)
@@ -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;
                }