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
1.4
Mark Michelson 17 years ago
parent e2eaf7f862
commit 36a68f792e

@ -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;
}

Loading…
Cancel
Save