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

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Oct 19 14:15:16 CDT 2009


Author: mmichelson
Date: Mon Oct 19 14:15:11 2009
New Revision: 224561

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=224561
Log:
Fix up some comments and change a function name.


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=224561&r1=224560&r2=224561
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Mon Oct 19 14:15:11 2009
@@ -56,8 +56,11 @@
 	</application>
  ***/
 
-/* File scope variables */
-
+/* These are some file-scoped variables. It would be
+ * nice to define them closer to their first usage, but since
+ * they are used in many places throughout the file, defining
+ * them here at the top is easiest.
+ */
 static struct ast_sched_thread *cc_sched_thread;
 static const int CC_CORE_INSTANCES_BUCKETS = 17;
 static int core_id_counter;
@@ -210,9 +213,6 @@
 	char cc_callback_macro[AST_MAX_EXTENSION];
 };
 
-/* XXX I'm making these defaults up right now with no real regard for
- * what they *should* be. This can be revisited.
- */
 static const unsigned int CC_OFFER_TIMER_DEFAULT = 20u;
 static const unsigned int CCNR_AVAILABLE_TIMER_DEFAULT = 7200u;
 static const unsigned int CCBS_AVAILABLE_TIMER_DEFAULT = 4800u;
@@ -697,10 +697,6 @@
 
 static int cc_extension_monitor_init(struct ast_cc_monitor *monitor, const int core_id)
 {
-	/* Currently, extension monitors don't really need to hold onto anything. However,
-	 * it may be necessary to hold onto state information received from child device
-	 * monitors. It will be much clearer once I begin design of device monitors.
-	 */
 	return 0;
 }
 
@@ -1821,7 +1817,7 @@
 	return ast_device_state(agent->interface);
 }
 
-static void generic_devstate_cb(const struct ast_event *event, void *userdata)
+static void generic_agent_devstate_cb(const struct ast_event *event, void *userdata)
 {
 	struct ast_cc_agent *agent = userdata;
 	struct ast_str *str = ast_str_alloca(128);
@@ -1838,7 +1834,7 @@
 	ast_str_set(&str, 0, "Starting to monitor %s device state since it is busy\n", agent->interface);
 
 	if (!(generic_pvt->sub = ast_event_subscribe(
-			AST_EVENT_DEVICE_STATE, generic_devstate_cb, ast_str_buffer(str), agent, 
+			AST_EVENT_DEVICE_STATE, generic_agent_devstate_cb, ast_str_buffer(str), agent, 
 			AST_EVENT_IE_DEVICE, AST_EVENT_IE_PLTYPE_STR, agent->interface,
 			AST_EVENT_IE_STATE, AST_EVENT_IE_PLTYPE_UINT, AST_DEVICE_NOT_INUSE,
 			AST_EVENT_IE_END))) {




More information about the svn-commits mailing list