[asterisk-commits] may: branch may/ooh323_ipv6 r313481 - /team/may/ooh323_ipv6/addons/chan_ooh323.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 12 16:35:32 CDT 2011


Author: may
Date: Tue Apr 12 16:35:28 2011
New Revision: 313481

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=313481
Log:
prepared for commit to trunk

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

Modified: team/may/ooh323_ipv6/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6/addons/chan_ooh323.c?view=diff&rev=313481&r1=313480&r2=313481
==============================================================================
--- team/may/ooh323_ipv6/addons/chan_ooh323.c (original)
+++ team/may/ooh323_ipv6/addons/chan_ooh323.c Tue Apr 12 16:35:28 2011
@@ -466,7 +466,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");
 
@@ -483,28 +483,6 @@
 	ast_mutex_init(&pvt->lock);
 	ast_mutex_lock(&pvt->lock);
 
-	/* ast_sockaddr_copy(&tmp, &bindaddr);
-	if (!(pvt->rtp = ast_rtp_instance_new("asterisk", sched, &tmp, NULL))) {
-		ast_log(LOG_WARNING, "Unable to create RTP session: %s\n", 
-				  strerror(errno));
-		ast_mutex_unlock(&pvt->lock);
-		ast_mutex_destroy(&pvt->lock);
-		ast_free(pvt);
-		return NULL;
-	}
- 
-	ast_rtp_instance_set_qos(pvt->rtp, gTOS, 0, "ooh323-rtp");
-
-	if (!(pvt->udptl = ast_udptl_new_with_bindaddr(sched, io, 0, &tmp))) {
-		ast_log(LOG_WARNING, "Unable to create UDPTL session: %s\n",
-				strerror(errno));
-		ast_mutex_unlock(&pvt->lock);
-		ast_mutex_destroy(&pvt->lock);
-		ast_free(pvt);
-		return NULL;
-	} 
-
-	ast_udptl_set_error_correction_scheme(pvt->udptl, UDPTL_ERROR_CORRECTION_NONE); */
 	ast_udptl_set_far_max_datagram(pvt->udptl, 144);
 	pvt->faxmode = 0;
 	pvt->t38support = gT38Support;
@@ -1221,11 +1199,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;
 	    		}
 		}
@@ -1259,9 +1238,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;
 
@@ -1542,7 +1522,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) {
@@ -1598,7 +1578,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) {
@@ -1665,7 +1645,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) {
@@ -2028,7 +2008,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) {
@@ -2077,7 +2057,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;
@@ -3332,7 +3312,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);
  
@@ -3590,7 +3570,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);
@@ -3945,7 +3925,7 @@
 	return 0;
 
 /* 	May 20101003 */
-/*	What functionalty is here? */
+/*	What we should to do here? */
 
 
 }
@@ -4196,7 +4176,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) {
@@ -4253,7 +4233,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) {
@@ -4334,8 +4314,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:
@@ -4356,8 +4338,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