[asterisk-commits] rmudgett: trunk r387210 - /trunk/channels/chan_local.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 1 15:53:32 CDT 2013


Author: rmudgett
Date: Wed May  1 15:53:30 2013
New Revision: 387210

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=387210
Log:
Whitespace changes.

Modified:
    trunk/channels/chan_local.c

Modified: trunk/channels/chan_local.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_local.c?view=diff&rev=387210&r1=387209&r2=387210
==============================================================================
--- trunk/channels/chan_local.c (original)
+++ trunk/channels/chan_local.c Wed May  1 15:53:30 2013
@@ -21,7 +21,7 @@
  * \author Mark Spencer <markster at digium.com>
  *
  * \brief Local Proxy Channel
- * 
+ *
  * \ingroup channel_drivers
  */
 
@@ -218,7 +218,7 @@
 }
 
 /* Called with ast locked */
-static int local_setoption(struct ast_channel *ast, int option, void * data, int datalen)
+static int local_setoption(struct ast_channel *ast, int option, void *data, int datalen)
 {
 	int res = 0;
 	struct local_pvt *p;
@@ -296,7 +296,7 @@
 	if (!context) {
 		ast_log(LOG_WARNING,
 			"Someone used Local/%s somewhere without a @context. This is bad.\n", data);
-		return AST_DEVICE_INVALID;	
+		return AST_DEVICE_INVALID;
 	}
 	*context++ = '\0';
 
@@ -424,7 +424,6 @@
 
 	/* Recalculate outbound channel */
 	other = isoutbound ? p->owner : p->chan;
-
 	if (!other) {
 		return 0;
 	}
@@ -472,6 +471,7 @@
 	if (isoutbound) {
 		/* Pass along answer since somebody answered us */
 		struct ast_frame answer = { AST_FRAME_CONTROL, { AST_CONTROL_ANSWER } };
+
 		res = local_queue_frame(p, isoutbound, &answer, ast, 1);
 	} else {
 		ast_log(LOG_WARNING, "Huh?  Local is being asked to answer?\n");
@@ -685,7 +685,9 @@
 	}
 
 	/* Do not let a masquerade cause a Local channel to be bridged to itself! */
-	if (!ast_check_hangup(newchan) && ((p->owner && ast_channel_internal_bridged_channel(p->owner) == p->chan) || (p->chan && ast_channel_internal_bridged_channel(p->chan) == p->owner))) {
+	if (!ast_check_hangup(newchan)
+		&& ((p->owner && ast_channel_internal_bridged_channel(p->owner) == p->chan)
+			|| (p->chan && ast_channel_internal_bridged_channel(p->chan) == p->owner))) {
 		ast_log(LOG_WARNING, "You can not bridge a Local channel to itself!\n");
 		ao2_unlock(p);
 		ast_queue_hangup(newchan);
@@ -717,6 +719,7 @@
 	} else if (condition == AST_CONTROL_CONNECTED_LINE || condition == AST_CONTROL_REDIRECTING) {
 		struct ast_channel *this_channel;
 		struct ast_channel *the_other_channel;
+
 		/* A connected line update frame may only contain a partial amount of data, such
 		 * as just a source, or just a ton, and not the full amount of information. However,
 		 * the collected information is all stored in the outgoing channel's connectedline
@@ -735,6 +738,7 @@
 		}
 		if (the_other_channel) {
 			unsigned char frame_data[1024];
+
 			if (condition == AST_CONTROL_CONNECTED_LINE) {
 				if (isoutbound) {
 					ast_connected_line_copy_to_caller(ast_channel_caller(the_other_channel), ast_channel_connected(this_channel));
@@ -766,7 +770,7 @@
 			if (!res && (condition == AST_CONTROL_T38_PARAMETERS) &&
 			    (datalen == sizeof(struct ast_control_t38_parameters))) {
 				const struct ast_control_t38_parameters *parameters = data;
-				
+
 				if (parameters->request_response == AST_T38_REQUEST_PARMS) {
 					res = AST_T38_REQUEST_PARMS;
 				}
@@ -997,16 +1001,17 @@
 		</managerEventInstance>
 	***/
 	manager_event(EVENT_FLAG_CALL, "LocalBridge",
-		      "Channel1: %s\r\n"
-		      "Channel2: %s\r\n"
-		      "Uniqueid1: %s\r\n"
-		      "Uniqueid2: %s\r\n"
-		      "Context: %s\r\n"
-		      "Exten: %s\r\n"
-		      "LocalOptimization: %s\r\n",
-			ast_channel_name(p->owner), ast_channel_name(p->chan), ast_channel_uniqueid(p->owner), ast_channel_uniqueid(p->chan),
-			p->context, p->exten,
-			ast_test_flag(p, LOCAL_NO_OPTIMIZATION) ? "Yes" : "No");
+		"Channel1: %s\r\n"
+		"Channel2: %s\r\n"
+		"Uniqueid1: %s\r\n"
+		"Uniqueid2: %s\r\n"
+		"Context: %s\r\n"
+		"Exten: %s\r\n"
+		"LocalOptimization: %s\r\n",
+		ast_channel_name(p->owner), ast_channel_name(p->chan),
+		ast_channel_uniqueid(p->owner), ast_channel_uniqueid(p->chan),
+		p->context, p->exten,
+		ast_test_flag(p, LOCAL_NO_OPTIMIZATION) ? "Yes" : "No");
 
 
 	/* Start switch on sub channel */
@@ -1372,7 +1377,6 @@
 	struct ao2_iterator it;
 
 	channel = astman_get_header(m, "Channel");
-
 	if (ast_strlen_zero(channel)) {
 		astman_send_error(s, m, "'Channel' not specified.");
 		return 0;




More information about the asterisk-commits mailing list