strlen fixes and don't destroy SIP channels that still have pending things on them (bug #1552 et al)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2890 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-05-04 19:11:25 +00:00
parent fdec9012eb
commit 19a080ddd7
5 changed files with 24 additions and 18 deletions

View File

@@ -651,6 +651,8 @@ static int __sip_semi_ack(struct sip_pvt *p, int seqno, int resp)
if (cur->retransid > -1)
ast_sched_del(sched, cur->retransid);
cur->retransid = -1;
/* Schedule destruction in 15000ms just in case */
sip_scheddestroy(p, 15000);
res = 0;
break;
}
@@ -6173,7 +6175,7 @@ restartsearch:
sip = iflist;
while(sip) {
ast_mutex_lock(&sip->lock);
if (sip->needdestroy && (!sip->packets || (sip->packets->retransid == -1))) {
if (sip->needdestroy && !sip->packets) {
ast_mutex_unlock(&sip->lock);
__sip_destroy(sip, 1);
goto restartsearch;