[Asterisk-cvs] asterisk/channels chan_mgcp.c,1.30,1.31 chan_sip.c,1.259,1.260

markster at lists.digium.com markster at lists.digium.com
Mon Dec 8 18:10:39 CST 2003


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv30464/channels

Modified Files:
	chan_mgcp.c chan_sip.c 
Log Message:
Minor mgcp debuggin changes, sip deadlock improvement


Index: chan_mgcp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_mgcp.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- chan_mgcp.c	5 Dec 2003 16:50:30 -0000	1.30
+++ chan_mgcp.c	9 Dec 2003 00:02:06 -0000	1.31
@@ -1060,13 +1060,16 @@
 			}
 			p = g->endpoints;
 			while(p) {
-                ast_log(LOG_DEBUG, "Searching on %s@%s for subchannel\n", p->name, g->name);
+				if (option_debug)
+	                ast_log(LOG_DEBUG, "Searching on %s@%s for subchannel\n", p->name, g->name);
                 if (msgid) {
                     sub = p->sub;
                     do {
-                        ast_log(LOG_DEBUG, "Searching on %s@%s-%d for subchannel with lastout: %d\n", p->name, g->name, sub->id, msgid);
+						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);
                         if (sub->lastout == msgid) {
-                            ast_log(LOG_DEBUG, "Found subchannel sub%d to handle request %d sub->lastout: %d\n", sub->id, msgid, sub->lastout);
+							if (option_debug)
+            	                ast_log(LOG_DEBUG, "Found subchannel sub%d to handle request %d sub->lastout: %d\n", sub->id, msgid, sub->lastout);
                             found = 1;
                             break;
                         }

Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.259
retrieving revision 1.260
diff -u -d -r1.259 -r1.260
--- chan_sip.c	28 Nov 2003 04:01:25 -0000	1.259
+++ chan_sip.c	9 Dec 2003 00:02:06 -0000	1.260
@@ -463,7 +463,7 @@
 	} 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");
 		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);
 			usleep(1);
 			ast_mutex_lock(&pkt->owner->lock);




More information about the svn-commits mailing list