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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 9 12:48:20 CST 2011


Author: may
Date: Fri Dec  9 12:48:16 2011
New Revision: 347864

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=347864
Log:
fix CODING-GUIDELINE issues for changed codes

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

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=347864&r1=347863&r2=347864
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c Fri Dec  9 12:48:16 2011
@@ -4136,10 +4136,10 @@
 {
 	struct ooh323_pvt *p = chan->tech_pvt;
 	if (gH323Debug) {
-		ast_verb(0, "+++ ooh323  get_codec, %s\n", chan->name);	
-	}
-
-	ast_format_cap_append(result,  ast_format_cap_is_empty(chan->nativeformats) ? 
+		ast_verb(0, "+++ ooh323  get_codec, %s\n", chan->name);
+	}
+
+	ast_format_cap_append(result,  ast_format_cap_is_empty(chan->nativeformats) ?
 				(ast_format_cap_is_empty(p->cap) ? NULL : p->cap) : chan->nativeformats);
 
 	if (gH323Debug) {
@@ -4156,7 +4156,7 @@
 	struct ast_sockaddr tmp;
 
 	if (gH323Debug) {
-		ast_verb(0, "+++ ooh323  get_rtp_peer \n");	
+		ast_verb(0, "+++ ooh323  get_rtp_peer \n");
 	}
 
 	if (!(p = (struct ooh323_pvt *) chan->tech_pvt))
@@ -4186,7 +4186,7 @@
 						ast_sockaddr_port(&tmp), res);
 	}
 	if (gH323Debug) {
-		ast_verb(0, "--- ooh323  get_rtp_peer, res = %d\n", (int) res);	
+		ast_verb(0, "--- ooh323  get_rtp_peer, res = %d\n", (int) res);
 	}
 
 	return res;
@@ -4274,8 +4274,9 @@
 	int mode, changed = 0;
 	char *callToken = NULL;
 
-	if (gH323Debug)
+	if (gH323Debug) {
 		ast_verb(0, "---   ooh323_set_peer - %s\n", chan->name);
+	}
 
 	mode = ooh323_convertAsteriskCapToH323Cap(&chan->writeformat); 
 	p = (struct ooh323_pvt *) chan->tech_pvt;
@@ -4303,8 +4304,6 @@
 	}
 
 
-	/* ast_rtp_instance_get_remote_address(rtp, &tmp);
-	ast_rtp_instance_get_local_address(rtp, &tmp); */
 	if (changed) {
 		if (!ast_sockaddr_isnull(&p->redirip)) {
 			if (gH323Debug)
@@ -4313,8 +4312,9 @@
 			ooUpdateLogChannels(callToken, ast_sockaddr_stringify_addr(&p->redirip),
 							ast_sockaddr_port(&p->redirip));
 		} else {
-			if (gH323Debug)
+			if (gH323Debug) {
 				ast_verb(0, "ooh323_set_rtp_peer  return back to local\n");
+			}
 			ooUpdateLogChannels(callToken, "0.0.0.0" , 0);
 		}
 	}
@@ -4461,15 +4461,14 @@
 	return 1;
 }
 
-void setup_rtp_remote(ooCallData *call, const char *remoteIp, 
-								  int remotePort)
+void setup_rtp_remote(ooCallData *call, const char *remoteIp, int remotePort)
 {
 	struct ooh323_pvt *p = NULL;
 	struct ast_sockaddr tmp;
 
-	if (gH323Debug)
+	if (gH323Debug) {
 		ast_verb(0, "---   setup_rtp_remote %s:%d\n", remoteIp, remotePort);
-
+	}
 	if (!remoteIp || !remoteIp[0] || !remotePort) {
 		if (gH323Debug) {
 			ast_verb(0, "+++ setup_rtp_remote no data\n");
@@ -4478,7 +4477,7 @@
 	}
 
 	/* Find the call or allocate a private structure if call not found */
-	p = find_call(call); 
+	p = find_call(call);
 
 	if (!p || !p->rtp) {
 		ast_log(LOG_ERROR, "Something is wrong: rtp\n");
@@ -4493,15 +4492,15 @@
 
 	ast_mutex_unlock(&p->lock);
 
-	if(gH323Debug)
+	if(gH323Debug) {
 		ast_verb(0, "+++   setup_rtp_remote\n");
+	}
 
 	return;
 }
 
 
-void setup_rtp_connection(ooCallData *call, const char *remoteIp, 
-								  int remotePort)
+void setup_rtp_connection(ooCallData *call, const char *remoteIp, int remotePort)
 {
 	struct ooh323_pvt *p = NULL;
 	struct ast_sockaddr tmp;
@@ -4510,7 +4509,7 @@
 		ast_verb(0, "---   setup_rtp_connection %s:%d\n", remoteIp, remotePort);
 
 	/* Find the call or allocate a private structure if call not found */
-	p = find_call(call); 
+	p = find_call(call);
 
 	if (!p || !p->rtp) {
 		ast_log(LOG_ERROR, "Something is wrong: rtp\n");
@@ -4523,7 +4522,7 @@
 	ast_sockaddr_set_port(&tmp, remotePort);
 	ast_rtp_instance_set_remote_address(p->rtp, &tmp);
 
-	if (p->writeformat.id == AST_FORMAT_G726_AAL2) 
+	if (p->writeformat.id == AST_FORMAT_G726_AAL2)
                 ast_rtp_codecs_payloads_set_rtpmap_type(ast_rtp_instance_get_codecs(p->rtp), p->rtp, 2,
 							"audio", "G726-32", AST_RTP_OPT_G726_NONSTANDARD);
 

Modified: team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.h
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.h?view=diff&rev=347864&r1=347863&r2=347864
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.h (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.h Fri Dec  9 12:48:16 2011
@@ -94,10 +94,8 @@
 int restart_monitor(void);
 
 int configure_local_rtp(struct ooh323_pvt *p, ooCallData* call);
-void setup_rtp_remote(ooCallData *call, const char *remoteIp, 
-                          int remotePort);
-void setup_rtp_connection(ooCallData *call, const char *remoteIp, 
-                          int remotePort);
+void setup_rtp_remote(ooCallData *call, const char *remoteIp, int remotePort);
+void setup_rtp_connection(ooCallData *call, const char *remoteIp, int remotePort);
 void close_rtp_connection(ooCallData *call);
 struct ast_frame *ooh323_rtp_read
          (struct ast_channel *ast, struct ooh323_pvt *p);




More information about the asterisk-commits mailing list