[asterisk-commits] branch group/rtpjitterbuffer r30993 - in /team/group/rtpjitterbuffer: ./ chan...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed May 31 07:52:33 MST 2006


Author: russell
Date: Wed May 31 09:52:32 2006
New Revision: 30993

URL: http://svn.digium.com/view/asterisk?rev=30993&view=rev
Log:
Merged revisions 30990,30992 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r30990 | oej | 2006-05-31 10:28:29 -0400 (Wed, 31 May 2006) | 2 lines

Use ast_channel_trylock for channels

........
r30992 | oej | 2006-05-31 10:36:47 -0400 (Wed, 31 May 2006) | 2 lines

Add congestion message to SIP history

........

Modified:
    team/group/rtpjitterbuffer/   (props changed)
    team/group/rtpjitterbuffer/channels/chan_sip.c

Propchange: team/group/rtpjitterbuffer/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed May 31 09:52:32 2006
@@ -1,1 +1,1 @@
-/trunk:1-30963
+/trunk:1-30992

Modified: team/group/rtpjitterbuffer/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/rtpjitterbuffer/channels/chan_sip.c?rev=30993&r1=30992&r2=30993&view=diff
==============================================================================
--- team/group/rtpjitterbuffer/channels/chan_sip.c (original)
+++ team/group/rtpjitterbuffer/channels/chan_sip.c Wed May 31 09:52:32 2006
@@ -1600,8 +1600,8 @@
 	pkt->retransid = -1;
 
 	if (ast_test_flag(pkt, FLAG_FATAL)) {
-		while(pkt->owner->owner && ast_mutex_trylock(&pkt->owner->owner->lock)) {
-			ast_mutex_unlock(&pkt->owner->lock);
+		while(pkt->owner->owner && ast_channel_trylock(pkt->owner->owner)) {
+			ast_mutex_unlock(&pkt->owner->lock);	/* SIP_PVT, not channel */
 			usleep(1);
 			ast_mutex_lock(&pkt->owner->lock);
 		}
@@ -2365,6 +2365,7 @@
 		/* XXX fails on possible deadlock */
 		if (!ast_channel_trylock(p->owner)) {
 			ast_log(LOG_NOTICE, "Auto-congesting %s\n", p->owner->name);
+			append_history(p, "Cong", "Auto-congesting (timer)");
 			ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
 			ast_channel_unlock(p->owner);
 		}
@@ -7205,7 +7206,7 @@
 					sip_pvt_ptr->theirtag, sip_pvt_ptr->tag);
 
 			/* deadlock avoidance... */
-			while (sip_pvt_ptr->owner && ast_mutex_trylock(&sip_pvt_ptr->owner->lock)) {
+			while (sip_pvt_ptr->owner && ast_channel_trylock(sip_pvt_ptr->owner)) {
 				ast_mutex_unlock(&sip_pvt_ptr->lock);
 				usleep(1);
 				ast_mutex_lock(&sip_pvt_ptr->lock);



More information about the asterisk-commits mailing list