Minor mgcp debuggin changes, sip deadlock improvement

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.0
Mark Spencer 22 years ago
parent 0f2bdc6d0a
commit 1451a407ac

@ -1060,12 +1060,15 @@ static struct mgcp_subchannel *find_subchannel(char *name, int msgid, struct soc
} }
p = g->endpoints; p = g->endpoints;
while(p) { while(p) {
if (option_debug)
ast_log(LOG_DEBUG, "Searching on %s@%s for subchannel\n", p->name, g->name); ast_log(LOG_DEBUG, "Searching on %s@%s for subchannel\n", p->name, g->name);
if (msgid) { if (msgid) {
sub = p->sub; sub = p->sub;
do { do {
if (option_debug)
ast_log(LOG_DEBUG, "Searching on %s@%s-%d for subchannel with lastout: %d\n", p->name, g->name, sub->id, msgid); ast_log(LOG_DEBUG, "Searching on %s@%s-%d for subchannel with lastout: %d\n", p->name, g->name, sub->id, msgid);
if (sub->lastout == msgid) { if (sub->lastout == msgid) {
if (option_debug)
ast_log(LOG_DEBUG, "Found subchannel sub%d to handle request %d sub->lastout: %d\n", sub->id, msgid, sub->lastout); ast_log(LOG_DEBUG, "Found subchannel sub%d to handle request %d sub->lastout: %d\n", sub->id, msgid, sub->lastout);
found = 1; found = 1;
break; break;

@ -463,7 +463,7 @@ static int retrans_pkt(void *data)
} else { } else {
ast_log(LOG_WARNING, "Maximum retries exceeded on call %s for seqno %d (%s)\n", pkt->owner->callid, pkt->seqno, pkt->resp ? "Response" : "Request"); ast_log(LOG_WARNING, "Maximum retries exceeded on call %s for seqno %d (%s)\n", pkt->owner->callid, pkt->seqno, pkt->resp ? "Response" : "Request");
pkt->retransid = -1; pkt->retransid = -1;
while(pkt->owner->owner && ast_mutex_lock(&pkt->owner->owner->lock)) { while(pkt->owner->owner && ast_mutex_trylock(&pkt->owner->owner->lock)) {
ast_mutex_unlock(&pkt->owner->lock); ast_mutex_unlock(&pkt->owner->lock);
usleep(1); usleep(1);
ast_mutex_lock(&pkt->owner->lock); ast_mutex_lock(&pkt->owner->lock);

Loading…
Cancel
Save