[asterisk-commits] mmichelson: branch 1.4 r97206 - /branches/1.4/apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 8 15:24:48 CST 2008


Author: mmichelson
Date: Tue Jan  8 15:24:48 2008
New Revision: 97206

URL: http://svn.digium.com/view/asterisk?view=rev&rev=97206
Log:
Some coding guidelines-related cleanup


Modified:
    branches/1.4/apps/app_queue.c

Modified: branches/1.4/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_queue.c?view=diff&rev=97206&r1=97205&r2=97206
==============================================================================
--- branches/1.4/apps/app_queue.c (original)
+++ branches/1.4/apps/app_queue.c Tue Jan  8 15:24:48 2008
@@ -716,7 +716,7 @@
 		cur->penalty = penalty;
 		cur->paused = paused;
 		ast_copy_string(cur->interface, interface, sizeof(cur->interface));
-		if(!ast_strlen_zero(membername))
+		if (!ast_strlen_zero(membername))
 			ast_copy_string(cur->membername, membername, sizeof(cur->membername));
 		else
 			ast_copy_string(cur->membername, interface, sizeof(cur->membername));
@@ -788,7 +788,7 @@
 	q->context[0] = '\0';
 	q->monfmt[0] = '\0';
 	q->periodicannouncefrequency = 0;
-	if(!q->members)
+	if (!q->members)
 		q->members = ao2_container_alloc(37, member_hash_fn, member_cmp_fn);
 	q->membercount = 0;
 	q->found = 1;
@@ -1246,14 +1246,14 @@
 	struct ast_variable *var;
 	int ret = -1;
 
-	if(!(var = ast_load_realtime("queue_members", "interface", mem->interface, "queue_name", queue_name, NULL))) 
+	if (!(var = ast_load_realtime("queue_members", "interface", mem->interface, "queue_name", queue_name, NULL))) 
 		return ret;
 	while (var) {
-		if(!strcmp(var->name, "uniqueid"))
+		if (!strcmp(var->name, "uniqueid"))
 			break;
 		var = var->next;
 	}
-	if(var && !ast_strlen_zero(var->value)) {
+	if (var && !ast_strlen_zero(var->value)) {
 		if ((ast_update_realtime("queue_members", "uniqueid", var->value, field, value, NULL)) > -1)
 			ret = 0;
 	}
@@ -3083,7 +3083,7 @@
 
 		if ((mem = ao2_find(q->members, &tmpmem, OBJ_POINTER))) {
 			/* XXX future changes should beware of this assumption!! */
-			if(!mem->dynamic) {
+			if (!mem->dynamic) {
 				res = RES_NOT_DYNAMIC;
 				ao2_ref(mem, -1);
 				ast_mutex_unlock(&q->lock);
@@ -3197,7 +3197,7 @@
 				if (queue_persistent_members)
 					dump_queue_members(q);
 
-				if(mem->realtime)
+				if (mem->realtime)
 					update_realtime_member_field(mem, q->name, "paused", paused ? "1" : "0");
 
 				ast_queue_log(q->name, "NONE", mem->membername, (paused ? "PAUSE" : "UNPAUSE"), "%s", "");
@@ -3863,7 +3863,7 @@
 
 	lu = ast_module_user_add(chan);
 
-	if((q = load_realtime_queue(data))) {
+	if ((q = load_realtime_queue(data))) {
 		ast_mutex_lock(&q->lock);
 		mem_iter = ao2_iterator_init(q->members, 0);
 		while ((m = ao2_iterator_next(&mem_iter))) {
@@ -4039,7 +4039,7 @@
 	use_weight=0;
 	/* Mark all non-realtime queues as dead for the moment */
 	AST_LIST_TRAVERSE(&queues, q, list) {
-		if(!q->realtime) {
+		if (!q->realtime) {
 			q->dead = 1;
 			q->found = 0;
 		}
@@ -4080,7 +4080,7 @@
 				/* Check if a queue with this name already exists */
 				if (q->found) {
 					ast_log(LOG_WARNING, "Queue '%s' already defined! Skipping!\n", cat);
-					if(!new)
+					if (!new)
 						ast_mutex_unlock(&q->lock);
 					continue;
 				}
@@ -4105,7 +4105,7 @@
 						AST_NONSTANDARD_APP_ARGS(args, parse, ',');
 
 						interface = args.interface;
-						if(!ast_strlen_zero(args.penalty)) {
+						if (!ast_strlen_zero(args.penalty)) {
 							tmp = args.penalty;
 							while (*tmp && *tmp < 33) tmp++;
 							penalty = atoi(tmp);




More information about the asterisk-commits mailing list