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

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Oct 9 14:07:55 CDT 2009


Author: mmichelson
Date: Fri Oct  9 14:07:51 2009
New Revision: 223287

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=223287
Log:
First step of code reorganization. Move the config-related stuff to its
own area.


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=223287&r1=223286&r2=223287
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Fri Oct  9 14:07:51 2009
@@ -98,66 +98,6 @@
 static const unsigned int CC_MAX_MONITORS_DEFAULT = 5u;
 static const unsigned int GLOBAL_CC_MAX_REQUESTS_DEFAULT = 20u;
 
-/* Generic agent callbacks */
-static int cc_generic_agent_init(struct ast_cc_agent *agent, struct ast_channel *chan);
-static int cc_generic_agent_start_offer_timer(struct ast_cc_agent *agent);
-static int cc_generic_agent_stop_offer_timer(struct ast_cc_agent *agent);
-static void cc_generic_agent_ack(struct ast_cc_agent *agent);
-static enum ast_device_state cc_generic_agent_status_request(struct ast_cc_agent *agent);
-static int cc_generic_agent_start_monitoring(struct ast_cc_agent *agent);
-static int cc_generic_agent_stop_monitoring(struct ast_cc_agent *agent);
-static int cc_generic_agent_recall(struct ast_cc_agent *agent);
-static void cc_generic_agent_destructor(struct ast_cc_agent *agent);
-
-static struct ast_cc_agent_callbacks generic_agent_callbacks = {
-	.type = "generic",
-	.init = cc_generic_agent_init,
-	.start_offer_timer = cc_generic_agent_start_offer_timer,
-	.stop_offer_timer = cc_generic_agent_stop_offer_timer,
-	.ack = cc_generic_agent_ack,
-	.status_request = cc_generic_agent_status_request,
-	.start_monitoring = cc_generic_agent_start_monitoring,
-	.stop_monitoring = cc_generic_agent_stop_monitoring,
-	.recall = cc_generic_agent_recall,
-	.destructor = cc_generic_agent_destructor,
-};
-
-static struct ast_cc_monitor *root_monitor;
-/* The parsed configuration value */
-static unsigned int global_cc_max_requests;
-/* The actual number of CC requests in the system */
-static int cc_request_count;
-
-struct cc_generic_agent_pvt {
-	/*!
-	 * Subscription to device state
-	 *
-	 * Used in the CC_CALLER_BUSY state. The
-	 * generic agent will subscribe to the
-	 * device state of the caller in order to
-	 * determine when we may move on
-	 */
-	struct ast_event_sub *sub;
-	/*!
-	 * Scheduler id of offer timer.
-	 */
-	int offer_timer_id;
-};
-
-static void prune_links(struct ast_cc_monitor *monitor, const int core_id, struct ast_cc_monitor_link *link_parent);
-
-#if 0
-static int print_debug(void *obj, void *args, int flags)
-{
-	struct ast_cc_monitor *monitor = obj;
-	ast_log(LOG_NOTICE, "%s is in the container\n", monitor->interface->name);
-	return 0;
-}
-#endif
-
-struct ast_taskprocessor *cc_core_taskprocessor;
-struct ast_sched_thread *cc_sched_thread;
-
 struct ast_cc_config_params *__ast_cc_config_params_init(const char *file, int line, const char *function)
 {
 #if defined(__AST_DEBUG_MALLOC)
@@ -457,6 +397,66 @@
 		ast_copy_string(config->cc_callback_macro, value, sizeof(config->cc_callback_macro));
 	}
 }
+
+/* Generic agent callbacks */
+static int cc_generic_agent_init(struct ast_cc_agent *agent, struct ast_channel *chan);
+static int cc_generic_agent_start_offer_timer(struct ast_cc_agent *agent);
+static int cc_generic_agent_stop_offer_timer(struct ast_cc_agent *agent);
+static void cc_generic_agent_ack(struct ast_cc_agent *agent);
+static enum ast_device_state cc_generic_agent_status_request(struct ast_cc_agent *agent);
+static int cc_generic_agent_start_monitoring(struct ast_cc_agent *agent);
+static int cc_generic_agent_stop_monitoring(struct ast_cc_agent *agent);
+static int cc_generic_agent_recall(struct ast_cc_agent *agent);
+static void cc_generic_agent_destructor(struct ast_cc_agent *agent);
+
+static struct ast_cc_agent_callbacks generic_agent_callbacks = {
+	.type = "generic",
+	.init = cc_generic_agent_init,
+	.start_offer_timer = cc_generic_agent_start_offer_timer,
+	.stop_offer_timer = cc_generic_agent_stop_offer_timer,
+	.ack = cc_generic_agent_ack,
+	.status_request = cc_generic_agent_status_request,
+	.start_monitoring = cc_generic_agent_start_monitoring,
+	.stop_monitoring = cc_generic_agent_stop_monitoring,
+	.recall = cc_generic_agent_recall,
+	.destructor = cc_generic_agent_destructor,
+};
+
+static struct ast_cc_monitor *root_monitor;
+/* The parsed configuration value */
+static unsigned int global_cc_max_requests;
+/* The actual number of CC requests in the system */
+static int cc_request_count;
+
+struct cc_generic_agent_pvt {
+	/*!
+	 * Subscription to device state
+	 *
+	 * Used in the CC_CALLER_BUSY state. The
+	 * generic agent will subscribe to the
+	 * device state of the caller in order to
+	 * determine when we may move on
+	 */
+	struct ast_event_sub *sub;
+	/*!
+	 * Scheduler id of offer timer.
+	 */
+	int offer_timer_id;
+};
+
+static void prune_links(struct ast_cc_monitor *monitor, const int core_id, struct ast_cc_monitor_link *link_parent);
+
+#if 0
+static int print_debug(void *obj, void *args, int flags)
+{
+	struct ast_cc_monitor *monitor = obj;
+	ast_log(LOG_NOTICE, "%s is in the container\n", monitor->interface->name);
+	return 0;
+}
+#endif
+
+struct ast_taskprocessor *cc_core_taskprocessor;
+struct ast_sched_thread *cc_sched_thread;
 
 void ast_cc_interface_destroy(void *data)
 {




More information about the svn-commits mailing list