[asterisk-commits] irroot: branch irroot/app_queue_skill r322174 - in /team/irroot/app_queue_ski...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jun 6 23:06:58 CDT 2011


Author: irroot
Date: Mon Jun  6 23:06:54 2011
New Revision: 322174

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=322174
Log:
Fix Conflict on app_queue

Modified:
    team/irroot/app_queue_skill/   (props changed)
    team/irroot/app_queue_skill/apps/app_queue.c

Propchange: team/irroot/app_queue_skill/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jun  6 23:06:54 2011
@@ -1,1 +1,1 @@
-/trunk:1-322081
+/trunk:1-322173

Modified: team/irroot/app_queue_skill/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/app_queue_skill/apps/app_queue.c?view=diff&rev=322174&r1=322173&r2=322174
==============================================================================
--- team/irroot/app_queue_skill/apps/app_queue.c (original)
+++ team/irroot/app_queue_skill/apps/app_queue.c Mon Jun  6 23:06:54 2011
@@ -2181,15 +2181,22 @@
  * \brief Find rt member record to update otherwise create one.
  *
  * Search for member in queue, if found update penalty/paused state,
- * if no member exists create one flag it as a RT member and add to queue member list. 
+ * if no member exists create one flag it as a RT member and add to queue member list.
 */
-static void rt_handle_member_record(struct call_queue *q, char *interface, const char *rt_uniqueid, const char *membername, const char *penalty_str, const char *paused_str, const char* state_interface, const char *skills)
+static void rt_handle_member_record(struct call_queue *q, char *interface, struct ast_config *member_config)
 {
 	struct member *m;
 	struct ao2_iterator mem_iter;
 	int penalty = 0;
 	int paused  = 0;
 	int found = 0;
+
+	const char *rt_uniqueid = ast_variable_retrieve(member_config, interface, "uniqueid");
+	const char *membername = S_OR(ast_variable_retrieve(member_config, interface, "membername"), interface);
+	const char *state_interface = S_OR(ast_variable_retrieve(member_config, interface, "state_interface"), interface);
+	const char *penalty_str = ast_variable_retrieve(member_config, interface, "penalty");
+	const char *paused_str = ast_variable_retrieve(member_config, interface, "paused");
+	const char *skills = ast_variable_retrieve(member_config, interface, "skills"));
 
 	if (ast_strlen_zero(rt_uniqueid)) {
 		ast_log(LOG_WARNING, "Realtime field uniqueid is empty for member %s\n", S_OR(membername, "NULL"));
@@ -2418,13 +2425,7 @@
 	ao2_iterator_destroy(&mem_iter);
 
 	while ((interface = ast_category_browse(member_config, interface))) {
-		rt_handle_member_record(q, interface,
-			ast_variable_retrieve(member_config, interface, "uniqueid"),
-			S_OR(ast_variable_retrieve(member_config, interface, "membername"),interface),
-			ast_variable_retrieve(member_config, interface, "penalty"),
-			ast_variable_retrieve(member_config, interface, "paused"),
-			S_OR(ast_variable_retrieve(member_config, interface, "state_interface"),interface),
-			ast_variable_retrieve(member_config, interface, "skills"));
+		rt_handle_member_record(q, interface, member_config);
 	}
 
 	/* Delete all realtime members that have been deleted in DB. */
@@ -2546,13 +2547,7 @@
 	ao2_iterator_destroy(&mem_iter);
 
 	while ((interface = ast_category_browse(member_config, interface))) {
-		rt_handle_member_record(q, interface,
-			ast_variable_retrieve(member_config, interface, "uniqueid"),
-			S_OR(ast_variable_retrieve(member_config, interface, "membername"), interface),
-			ast_variable_retrieve(member_config, interface, "penalty"),
-			ast_variable_retrieve(member_config, interface, "paused"),
-			S_OR(ast_variable_retrieve(member_config, interface, "state_interface"), interface),
-			ast_variable_retrieve(member_config, interface, "skills"));
+		rt_handle_member_record(q, interface, member_config);
 	}
 
 	/* Delete all realtime members that have been deleted in DB. */




More information about the asterisk-commits mailing list