diff options
author | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-07 01:05:29 +0000 |
---|---|---|
committer | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-07 01:05:29 +0000 |
commit | 044a75c7228d0d15f012f6d887cfbbb6551e6c66 (patch) | |
tree | 5443f672ab69bea402de5dabba2a8bf007cb3f85 | |
parent | 76bed096b245fc89715335232e4a3e3cf59b3034 (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@12231 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index ead444195..6a62ea5c6 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -1389,12 +1389,12 @@ static int __sip_ack(struct sip_pvt *p, int seqno, int resp, int sipmethod) msg = sip_methods[sipmethod].text; + ast_mutex_lock(&p->lock); cur = p->packets; while(cur) { if ((cur->seqno == seqno) && ((ast_test_flag(cur, FLAG_RESPONSE)) == resp) && ((ast_test_flag(cur, FLAG_RESPONSE)) || (!strncasecmp(msg, cur->data, strlen(msg)) && (cur->data[strlen(msg)] < 33)))) { - ast_mutex_lock(&p->lock); if (!resp && (seqno == p->pendinginvite)) { ast_log(LOG_DEBUG, "Acked pending invite %d\n", p->pendinginvite); p->pendinginvite = 0; @@ -1411,13 +1411,13 @@ static int __sip_ack(struct sip_pvt *p, int seqno, int resp, int sipmethod) ast_sched_del(sched, cur->retransid); } free(cur); - ast_mutex_unlock(&p->lock); res = 0; break; } prev = cur; cur = cur->next; } + ast_mutex_unlock(&p->lock); ast_log(LOG_DEBUG, "Stopping retransmission on '%s' of %s %d: Match %s\n", p->callid, resp ? "Response" : "Request", seqno, res ? "Not Found" : "Found"); return res; } |