Always lock call in find_call

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer 2003-05-17 14:47:17 +00:00
parent 26926ffcfa
commit bbdb142d2e
1 changed files with 4 additions and 1 deletions

View File

@ -1359,7 +1359,10 @@ static struct sip_pvt *find_call(struct sip_request *req, struct sockaddr_in *si
p = p->next;
}
ast_pthread_mutex_unlock(&iflock);
return sip_alloc(callid, sin, 1);
p = sip_alloc(callid, sin, 1);
if (p)
ast_pthread_mutex_lock(&p->lock);
return p;
}
static int sip_register(char *value, int lineno)