[svn-commits] rmudgett: trunk r381628 - /trunk/apps/app_confbridge.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Feb 16 14:44:47 CST 2013


Author: rmudgett
Date: Sat Feb 16 14:44:44 2013
New Revision: 381628

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=381628
Log:
confbridge: Rename i iterator variables to iter.

Modified:
    trunk/apps/app_confbridge.c

Modified: trunk/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_confbridge.c?view=diff&rev=381628&r1=381627&r2=381628
==============================================================================
--- trunk/apps/app_confbridge.c (original)
+++ trunk/apps/app_confbridge.c Sat Feb 16 14:44:44 2013
@@ -2157,10 +2157,10 @@
 	struct conference_bridge *bridge = NULL;
 	char *res = NULL;
 	int wordlen = strlen(word);
-	struct ao2_iterator i;
-
-	i = ao2_iterator_init(conference_bridges, 0);
-	while ((bridge = ao2_iterator_next(&i))) {
+	struct ao2_iterator iter;
+
+	iter = ao2_iterator_init(conference_bridges, 0);
+	while ((bridge = ao2_iterator_next(&iter))) {
 		if (!strncasecmp(bridge->name, word, wordlen) && ++which > state) {
 			res = ast_strdup(bridge->name);
 			ao2_ref(bridge, -1);
@@ -2168,7 +2168,7 @@
 		}
 		ao2_ref(bridge, -1);
 	}
-	ao2_iterator_destroy(&i);
+	ao2_iterator_destroy(&iter);
 
 	return res;
 }
@@ -2236,10 +2236,7 @@
 
 static char *handle_cli_confbridge_list(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
 {
-	struct ao2_iterator i;
-	struct conference_bridge *bridge = NULL;
-	struct conference_bridge tmp;
-	struct conference_bridge_user *participant = NULL;
+	struct conference_bridge *bridge;
 
 	switch (cmd) {
 	case CLI_INIT:
@@ -2256,18 +2253,23 @@
 	}
 
 	if (a->argc == 2) {
+		struct ao2_iterator iter;
+
 		ast_cli(a->fd, "Conference Bridge Name           Users  Marked Locked?\n");
 		ast_cli(a->fd, "================================ ====== ====== ========\n");
-		i = ao2_iterator_init(conference_bridges, 0);
-		while ((bridge = ao2_iterator_next(&i))) {
+		iter = ao2_iterator_init(conference_bridges, 0);
+		while ((bridge = ao2_iterator_next(&iter))) {
 			ast_cli(a->fd, "%-32s %6i %6i %s\n", bridge->name, bridge->activeusers + bridge->waitingusers, bridge->markedusers, (bridge->locked ? "locked" : "unlocked"));
 			ao2_ref(bridge, -1);
 		}
-		ao2_iterator_destroy(&i);
+		ao2_iterator_destroy(&iter);
 		return CLI_SUCCESS;
 	}
 
 	if (a->argc == 3) {
+		struct conference_bridge_user *participant;
+		struct conference_bridge tmp;
+
 		ast_copy_string(tmp.name, a->argv[2], sizeof(tmp.name));
 		bridge = ao2_find(conference_bridges, &tmp, OBJ_POINTER);
 		if (!bridge) {
@@ -2657,7 +2659,7 @@
 {
 	const char *actionid = astman_get_header(m, "ActionID");
 	struct conference_bridge *bridge = NULL;
-	struct ao2_iterator i;
+	struct ao2_iterator iter;
 	char id_text[512] = "";
 	int totalitems = 0;
 
@@ -2673,8 +2675,8 @@
 	astman_send_listack(s, m, "Confbridge conferences will follow", "start");
 
 	/* Traverse the conference list */
-	i = ao2_iterator_init(conference_bridges, 0);
-	while ((bridge = ao2_iterator_next(&i))) {
+	iter = ao2_iterator_init(conference_bridges, 0);
+	while ((bridge = ao2_iterator_next(&iter))) {
 		totalitems++;
 
 		ao2_lock(bridge);
@@ -2695,7 +2697,7 @@
 
 		ao2_ref(bridge, -1);
 	}
-	ao2_iterator_destroy(&i);
+	ao2_iterator_destroy(&iter);
 
 	/* Send final confirmation */
 	astman_append(s,




More information about the svn-commits mailing list