[asterisk-commits] file: branch file/bridging r172510 - /team/file/bridging/main/bridging.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jan 30 06:46:10 CST 2009


Author: file
Date: Fri Jan 30 06:46:10 2009
New Revision: 172510

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=172510
Log:
Fix up some things per Terry's review. Mostly coding guidelines issues.

Modified:
    team/file/bridging/main/bridging.c

Modified: team/file/bridging/main/bridging.c
URL: http://svn.digium.com/svn-view/asterisk/team/file/bridging/main/bridging.c?view=diff&rev=172510&r1=172509&r2=172510
==============================================================================
--- team/file/bridging/main/bridging.c (original)
+++ team/file/bridging/main/bridging.c Fri Jan 30 06:46:10 2009
@@ -85,9 +85,10 @@
 
 	AST_RWLIST_UNLOCK(&bridge_technologies);
 
-	if (option_verbose > 1)
+	if (option_verbose > 1) {
 		ast_verbose(VERBOSE_PREFIX_2 "Registered bridge technology %s\n", technology->name);
-
+	}
+	
 	return 0;
 }
 
@@ -101,8 +102,9 @@
 	AST_RWLIST_TRAVERSE_SAFE_BEGIN(&bridge_technologies, current, entry) {
 		if (current == technology) {
 			AST_RWLIST_REMOVE_CURRENT(entry);
-			if (option_verbose > 1)
+			if (option_verbose > 1) {
 				ast_verbose(VERBOSE_PREFIX_2 "Unregistered bridge technology %s\n", technology->name);
+			}
 			break;
 		}
 	}
@@ -183,8 +185,8 @@
 
 	for (i = 0; i < bridge->array_num; i++) {
 		if (bridge->array[i] == chan) {
-			bridge->array[i] = (bridge->array[(bridge->array_num-1)] != chan ? bridge->array[(bridge->array_num-1)] : NULL);
-			bridge->array[(bridge->array_num-1)] = NULL;
+			bridge->array[i] = (bridge->array[(bridge->array_num - 1)] != chan ? bridge->array[(bridge->array_num - 1)] : NULL);
+			bridge->array[(bridge->array_num - 1)] = NULL;
 			bridge->array_num--;
 			ast_debug(1, "Removed channel %p from bridge array on %p, new count is %d\n", chan, bridge, (int)bridge->array_num);
 			break;
@@ -200,8 +202,9 @@
 	struct ast_bridge_channel *bridge_channel = NULL;
 
 	AST_LIST_TRAVERSE(&bridge->channels, bridge_channel, entry) {
-		if (bridge_channel->chan == chan)
+		if (bridge_channel->chan == chan) {
 			break;
+		}
 	}
 
 	return bridge_channel;
@@ -313,7 +316,7 @@
 		if (bridge->array_num > 1) {
 			struct ast_channel *first = bridge->array[0];
 			memmove(bridge->array, bridge->array + 1, sizeof(bridge->array) - 1);
-			bridge->array[(bridge->array_num-1)] = first;
+			bridge->array[(bridge->array_num - 1)] = first;
 		}
 
 		/* Wait on the channels */
@@ -435,7 +438,7 @@
 	 * just look for the most basic capability needed, single 1to1 mixing. */
 	bridge_technology = (capabilities ? find_best_technology(capabilities) : find_best_technology(AST_BRIDGE_CAPABILITY_1TO1MIX));
 
-	/* If no bridge technology was found we can't possible do bridging so fail creation of the bridge */
+	/* If no bridge technology was found we can't possibly do bridging so fail creation of the bridge */
 	if (!bridge_technology) {
 		ast_debug(1, "Failed to find a bridge technology to satisfy capabilities %d\n", capabilities);
 		return NULL;




More information about the asterisk-commits mailing list