[svn-commits] mmichelson: branch group/CCSS r246380 - /team/group/CCSS/main/ccss.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Feb 11 19:07:10 CST 2010


Author: mmichelson
Date: Thu Feb 11 19:07:06 2010
New Revision: 246380

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=246380
Log:
Move the check for if cc_params is non-NULL to where cc_params is set now.


Modified:
    team/group/CCSS/main/ccss.c

Modified: team/group/CCSS/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=246380&r1=246379&r2=246380
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Thu Feb 11 19:07:06 2010
@@ -2248,22 +2248,21 @@
 	int recall_core_id;
 
 	cc_params = ast_channel_get_cc_config_params(caller_chan);
-	ast_channel_get_device_name(caller_chan, caller, sizeof(caller));
-	/* First, we need to kill off other pending CC offers from caller. If the caller is going
-	 * to request a CC service, it may only be for the latest call he made.
-	 */
-	if (ast_get_cc_agent_policy(cc_params) == AST_CC_AGENT_GENERIC) {
-		kill_duplicate_offers(caller);
-	}
-
-	ast_cc_is_recall(caller_chan, &recall_core_id, NULL);
-
 	if (!cc_params) {
 		ast_log_dynamic_level(cc_logger_level, "Could not get CC parameters for %s\n",
 			caller);
 		call_destructor_with_no_monitor(cc_data->monitor_type, cc_data->private_data);
 		return NULL;
 	}
+	ast_channel_get_device_name(caller_chan, caller, sizeof(caller));
+	/* First, we need to kill off other pending CC offers from caller. If the caller is going
+	 * to request a CC service, it may only be for the latest call he made.
+	 */
+	if (ast_get_cc_agent_policy(cc_params) == AST_CC_AGENT_GENERIC) {
+		kill_duplicate_offers(caller);
+	}
+
+	ast_cc_is_recall(caller_chan, &recall_core_id, NULL);
 	agent_count = count_agents(caller, recall_core_id);
 	if (agent_count >= ast_get_cc_max_agents(cc_params)) {
 		ast_log_dynamic_level(cc_logger_level, "Caller %s already has the maximum number of agents configured\n", caller);




More information about the svn-commits mailing list