[asterisk-commits] may: branch may/ooh323_ipv6_direct_rtp r321509 - /team/may/ooh323_ipv6_direct...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat May 28 04:35:45 CDT 2011


Author: may
Date: Sat May 28 04:35:38 2011
New Revision: 321509

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=321509
Log:
did cosmetic changes

Modified:
    team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c

Modified: team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c?view=diff&rev=321509&r1=321508&r2=321509
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c Sat May 28 04:35:38 2011
@@ -473,7 +473,7 @@
 static struct ooh323_pvt *ooh323_alloc(int callref, char *callToken) 
 {
 	struct ooh323_pvt *pvt = NULL;
-	/* struct ast_sockaddr tmp; */
+
 	if (gH323Debug)
 		ast_verbose("---   ooh323_alloc\n");
 
@@ -490,7 +490,6 @@
 	ast_mutex_init(&pvt->lock);
 	ast_mutex_lock(&pvt->lock);
 
-	ast_udptl_set_far_max_datagram(pvt->udptl, 144);
 	pvt->faxmode = 0;
 	pvt->t38support = gT38Support;
 	pvt->rtptimeout = gRTPTimeout;
@@ -1213,11 +1212,12 @@
 	case AST_CONTROL_PROGRESS:
 		if (ast->_state != AST_STATE_UP) {
 	    		if (!p->progsent) {
-	     			if (gH323Debug) 
-					ast_log(LOG_DEBUG,"Sending manual progress for %s, res = %d\n", callToken,
+	     			if (gH323Debug) {
+					ast_debug(1, "Sending manual progress for %s, res = %d\n", callToken,
              				ooManualProgress(callToken));	
-				else
+				} else {
 	     				ooManualProgress(callToken);
+				}
 	     			p->progsent = 1;
 	    		}
 		}
@@ -1251,9 +1251,10 @@
 			|| ast_strlen_zero(ast->connected.id.name.str)) {
 			break;
 		}
-		if (gH323Debug)
-			ast_log(LOG_DEBUG, "Sending connected line info for %s (%s)\n",
+		if (gH323Debug) {
+			ast_debug(1, "Sending connected line info for %s (%s)\n",
 				callToken, ast->connected.id.name.str);
+		}
 		ooSetANI(callToken, ast->connected.id.name.str);
 		break;
 
@@ -1306,7 +1307,6 @@
 	default:
 		ast_log(LOG_WARNING, "Don't know how to indicate condition %d on %s\n",
 									condition, callToken);
-		res = -1;
 	}
 
    	ast_mutex_unlock(&p->lock);
@@ -1531,11 +1531,11 @@
 	ast_mutex_lock(&p->lock);
 	if (!p->owner) {
 		ast_mutex_unlock(&p->lock);
-		ast_log(LOG_ERROR, "Channel has no owner\n");
+		ast_debug(1, "Channel has no owner\n");
 		return 0;
 	}
 	while (p->owner && ast_channel_trylock(p->owner)) {
-		ast_debug(1,"Failed to grab lock, trying again\n");
+		ast_debug(1, "Failed to grab lock, trying again\n");
 		DEADLOCK_AVOIDANCE(&p->lock);
 	}
 	if (!p->owner) {
@@ -1591,7 +1591,7 @@
 		return 0;
 	}
 	while (p->owner && ast_channel_trylock(p->owner)) {
-		ast_debug(1,"Failed to grab lock, trying again\n");
+		ast_debug(1, "Failed to grab lock, trying again\n");
 		DEADLOCK_AVOIDANCE(&p->lock);
 	}
 	if (!p->owner) {
@@ -1658,7 +1658,7 @@
 	f.src = "SEND_DIGIT";
 
 	while (p->owner && ast_channel_trylock(p->owner)) {
-		ast_debug(1,"Failed to grab lock, trying again\n");
+		ast_debug(1, "Failed to grab lock, trying again\n");
 		DEADLOCK_AVOIDANCE(&p->lock);
 	}
 	if (!p->owner) {
@@ -2023,7 +2023,7 @@
 		}
 	
 		while (p->owner && ast_channel_trylock(p->owner)) {
-			ast_debug(1,"Failed to grab lock, trying again\n");
+			ast_debug(1, "Failed to grab lock, trying again\n");
 			DEADLOCK_AVOIDANCE(&p->lock);
 		}
 		if (p->owner) {
@@ -2072,7 +2072,7 @@
 	while (p->owner) {
 		if (ast_channel_trylock(p->owner)) {
 			ooTrace(OOTRCLVLINFO, "Failed to grab lock, trying again\n");
-         		ast_log(LOG_DEBUG,"Failed to grab lock, trying again\n");
+         		ast_debug(1, "Failed to grab lock, trying again\n");
 			DEADLOCK_AVOIDANCE(&p->lock);
 		} else {
          		ownerLock = 1; break;
@@ -3338,7 +3338,7 @@
       		ooH323EpSetTraceLevel(gTRCLVL);
 		ooH323EpSetLocalAddress(gIP, gPort);
 		if (v6mode) {
-			ast_log(LOG_DEBUG, "OOH323 channel is in IP6 mode\n");
+			ast_debug(1, "OOH323 channel is in IP6 mode\n");
 		}
 		ooH323EpSetCallerID(gCallerID);
  
@@ -3596,7 +3596,7 @@
 		/* Unlink us from the owner if we have one */
 		if (cur->owner) {
          		while(ast_channel_trylock(cur->owner)) {
-            			ast_debug(1,"Failed to grab lock, trying again\n");
+            			ast_debug(1, "Failed to grab lock, trying again\n");
 				DEADLOCK_AVOIDANCE(&cur->lock);
          		}           
 			ast_debug(1, "Detaching from %s\n", cur->owner->name);
@@ -3967,7 +3967,6 @@
 {
 	/* XXX Deal with Video */
 	struct ooh323_pvt *p;
-	/* struct ast_sockaddr tmp; */
 	int mode, changed = 0;
 	char *callToken = NULL;
 
@@ -4021,6 +4020,7 @@
 	ast_mutex_unlock(&p->lock);
 	free(callToken);
 	return 0;
+
 }
 
 
@@ -4057,6 +4057,7 @@
 			strerror(errno));
 		return 0;
 	}
+	ast_udptl_set_far_max_datagram(p->udptl, 144);
 
 	if (p->owner) {
 		while (p->owner && ast_channel_trylock(p->owner)) {
@@ -4274,7 +4275,7 @@
 	ast_mutex_lock(&p->lock);
 	if (p->owner) {
 		while (p->owner && ast_channel_trylock(p->owner)) {
-			ast_debug(1,"Failed to grab lock, trying again\n");
+			ast_debug(1, "Failed to grab lock, trying again\n");
 			DEADLOCK_AVOIDANCE(&p->lock);
 		}
 		if (!p->owner) {
@@ -4331,7 +4332,7 @@
 	ast_mutex_lock(&p->lock);
 	if (p->owner) {
 		while (p->owner && ast_channel_trylock(p->owner)) {
-			ast_debug(1,"Failed to grab lock, trying again\n");
+			ast_debug(1, "Failed to grab lock, trying again\n");
 			DEADLOCK_AVOIDANCE(&p->lock);
 		}
 		if (!p->owner) {
@@ -4412,8 +4413,10 @@
 		break;
 	case 5:
 		f = ast_udptl_read(p->udptl);		/* UDPTL t.38 data */
-		if (gH323Debug) ast_debug(1, "Got UDPTL %d/%d len %d for %s\n",
+		if (gH323Debug) {
+			 ast_debug(1, "Got UDPTL %d/%d len %d for %s\n",
 				f->frametype, f->subclass.integer, f->datalen, ast->name);
+		}
 		break;
 
 	default:
@@ -4434,8 +4437,9 @@
 				(f->subclass.format.id == AST_FORMAT_SLINEAR || f->subclass.format.id == AST_FORMAT_ALAW ||
 					f->subclass.format.id == AST_FORMAT_ULAW)) {
 				f = ast_dsp_process(p->owner, p->vad, f);
-            			if (f && (f->frametype == AST_FRAME_DTMF)) 
+            			if (f && (f->frametype == AST_FRAME_DTMF)) {
                				ast_debug(1, "* Detected inband DTMF '%c'\n", f->subclass.integer);
+				}
 			}
 		}
 	}




More information about the asterisk-commits mailing list