[asterisk-commits] mmichelson: branch mmichelson/queue-reset r167166 - /team/mmichelson/queue-re...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jan 4 14:04:28 CST 2009


Author: mmichelson
Date: Sun Jan  4 14:04:27 2009
New Revision: 167166

URL: http://svn.digium.com/view/asterisk?view=rev&rev=167166
Log:
Fix some flag-handling bugs.

The QUEUE_RELOAD and QUEUE_RELOAD_PARAMETERS flags were
being used interchangeably, so there really needed to be
only one. QUEUE_RELOAD_PARAMETERS is more clear in its
intent, so I did a search and replace operation and just
removed the QUEUE_RELOAD flag from the source entirely


Modified:
    team/mmichelson/queue-reset/apps/app_queue.c

Modified: team/mmichelson/queue-reset/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/mmichelson/queue-reset/apps/app_queue.c?view=diff&rev=167166&r1=167165&r2=167166
==============================================================================
--- team/mmichelson/queue-reset/apps/app_queue.c (original)
+++ team/mmichelson/queue-reset/apps/app_queue.c Sun Jan  4 14:04:27 2009
@@ -495,11 +495,10 @@
 };
 
 enum queue_reload_mask {
-	QUEUE_RELOAD = (1 << 0),
+	QUEUE_RELOAD_PARAMETERS = (1 << 0),
 	QUEUE_RELOAD_MEMBER = (1 << 1),
 	QUEUE_RELOAD_RULES = (1 << 2),
 	QUEUE_RESET_STATS = (1 << 3),
-	QUEUE_RELOAD_PARAMETERS = (1 << 4),
 };
 
 static const struct strategy {
@@ -5592,7 +5591,7 @@
 	};
 	const char *tmpvar;
 	struct ao2_iterator mem_iter;
-	const int queue_reload = ast_test_flag(mask, QUEUE_RELOAD);
+	const int queue_reload = ast_test_flag(mask, QUEUE_RELOAD_PARAMETERS);
 	const int member_reload = ast_test_flag(mask, QUEUE_RELOAD_MEMBER);
 	int prev_weight = 0;
 	struct member *cur;
@@ -5722,7 +5721,7 @@
 	char *cat;
 	struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
 	struct ao2_iterator queue_iter;
-	const int queue_reload = ast_test_flag(mask, QUEUE_RELOAD);
+	const int queue_reload = ast_test_flag(mask, QUEUE_RELOAD_PARAMETERS);
 
 	if (!(cfg = ast_config_load("queues.conf", config_flags))) {
 		ast_log(LOG_NOTICE, "No call queueing config file (queues.conf), so no call queues\n");
@@ -5795,7 +5794,7 @@
 	if (ast_test_flag(mask, QUEUE_RESET_STATS)) {
 		clear_stats(queuename);
 	}
-	if (ast_test_flag(mask, (QUEUE_RELOAD | QUEUE_RELOAD_MEMBER))) {
+	if (ast_test_flag(mask, (QUEUE_RELOAD_PARAMETERS | QUEUE_RELOAD_MEMBER))) {
 		reload_queues(reload, mask, queuename);
 	}
 	return 1;




More information about the asterisk-commits mailing list