[asterisk-commits] irroot: branch irroot/t38gateway-1.8 r318988 - /team/irroot/t38gateway-1.8/ch...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat May 14 10:28:13 CDT 2011


Author: irroot
Date: Sat May 14 10:28:09 2011
New Revision: 318988

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=318988
Log:
Remove some of the distrotech code that was included in update.
there are some deadlock avoidences and custom bits added that are not part of this branch


Modified:
    team/irroot/t38gateway-1.8/channels/chan_sip.c

Modified: team/irroot/t38gateway-1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/t38gateway-1.8/channels/chan_sip.c?view=diff&rev=318988&r1=318987&r2=318988
==============================================================================
--- team/irroot/t38gateway-1.8/channels/chan_sip.c (original)
+++ team/irroot/t38gateway-1.8/channels/chan_sip.c Sat May 14 10:28:09 2011
@@ -6046,10 +6046,7 @@
 	} else
 		ast_debug(1, "Hangup call %s, SIP callid %s\n", ast->name, p->callid);
 
-	while (sip_pvt_trylock(p)) {
-		CHANNEL_DEADLOCK_AVOIDANCE(ast);
-	}
-
+	sip_pvt_lock(p);
 	if (ast_test_flag(&p->flags[0], SIP_INC_COUNT) || ast_test_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD)) {
 		if (sipdebug)
 			ast_debug(1, "update_call_counter(%s) - decrement call limit counter on hangup\n", p->username);
@@ -6275,9 +6272,7 @@
 			return 0;
 		}
 		if (p) {
-			while (sip_pvt_trylock(p)) {
-				CHANNEL_DEADLOCK_AVOIDANCE(ast);
-			}
+			sip_pvt_lock(p);
 			if (p->rtp) {
 				/* If channel is not up, activate early media session */
 				if ((ast->_state != AST_STATE_UP) &&
@@ -6386,10 +6381,7 @@
 	}
 	p = newchan->tech_pvt;
 
-	while (sip_pvt_trylock(p)) {
-		CHANNEL_DEADLOCK_AVOIDANCE(oldchan);
-	}
-
+	sip_pvt_lock(p);
 	append_history(p, "Masq", "Old channel: %s\n", oldchan->name);
 	append_history(p, "Masq (cont)", "...new owner: %s\n", newchan->name);
 	if (p->owner != oldchan)
@@ -6443,10 +6435,6 @@
 {
 	struct sip_pvt *p = ast->tech_pvt;
 	int res = 0;
-
-	if (!p) {
-		return res;
-	}
 
 	sip_pvt_lock(p);
 	switch (ast_test_flag(&p->flags[0], SIP_DTMF)) {
@@ -7192,10 +7180,7 @@
 	struct sip_pvt *p = ast->tech_pvt;
 	int faxdetected = FALSE;
 
-	while (sip_pvt_trylock(p)) {
-		CHANNEL_DEADLOCK_AVOIDANCE(ast);
-	}
-
+	sip_pvt_lock(p);
 	fr = sip_rtp_read(ast, p, &faxdetected);
 	p->lastrtprx = time(NULL);
 
@@ -26087,11 +26072,6 @@
 	while ((mbox = context = strsep(&next, ","))) {
 		struct sip_mailbox *mailbox;
 		int duplicate = 0;
-
-		if (strstr("@",context) == NULL) {
-			strncat(context,"@",sizeof(context)-2);
-			strncat(context,peer->context,sizeof(context)-strlen(peer->context)-1);
-		}
 
 		strsep(&context, "@");
 
@@ -27953,10 +27933,7 @@
 		return AST_RTP_GLUE_RESULT_FORBID;
 	}
 
-	while (sip_pvt_trylock(p)) {
-		CHANNEL_DEADLOCK_AVOIDANCE(chan);
-	}
-
+	sip_pvt_lock(p);
 	if (!(p->rtp)) {
 		sip_pvt_unlock(p);
 		return AST_RTP_GLUE_RESULT_FORBID;




More information about the asterisk-commits mailing list