[asterisk-commits] mmichelson: branch group/CCSS_Monitor_Restructure r242023 - /team/group/CCSS_...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 21 10:56:16 CST 2010


Author: mmichelson
Date: Thu Jan 21 10:56:14 2010
New Revision: 242023

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=242023
Log:
Write cancel_available_timer2 function for generic monitor.


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

Modified: team/group/CCSS_Monitor_Restructure/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS_Monitor_Restructure/main/ccss.c?view=diff&rev=242023&r1=242022&r2=242023
==============================================================================
--- team/group/CCSS_Monitor_Restructure/main/ccss.c (original)
+++ team/group/CCSS_Monitor_Restructure/main/ccss.c Thu Jan 21 10:56:14 2010
@@ -996,6 +996,7 @@
 static int cc_generic_monitor_suspend2(struct cc_monitor *monitor);
 static int cc_generic_monitor_status_response(struct ast_cc_monitor *monitor, const int core_id, enum ast_device_state devstate);
 static int cc_generic_monitor_unsuspend2(struct cc_monitor *monitor);
+static int cc_generic_monitor_cancel_available_timer2(struct cc_monitor *monitor, int *sched_id);
 static int cc_generic_monitor_cancel_available_timer(struct ast_cc_monitor *monitor, const int core_id, int *sched_id);
 static void cc_generic_monitor_destructor2(void *private_data);
 
@@ -1007,6 +1008,7 @@
 	.status_response = cc_generic_monitor_status_response,
 	.unsuspend2 = cc_generic_monitor_unsuspend2,
 	.cancel_available_timer = cc_generic_monitor_cancel_available_timer,
+	.cancel_available_timer2 = cc_generic_monitor_cancel_available_timer2,
 	.destructor2 = cc_generic_monitor_destructor2,
 };
 
@@ -1287,6 +1289,18 @@
 	return 0;
 }
 
+static int cc_generic_monitor_cancel_available_timer2(struct cc_monitor *monitor, int *sched_id)
+{
+	ast_assert(sched_id != NULL);
+
+	if (*sched_id == -1) {
+		return 0;
+	}
+
+	ast_log_dynamic_level(cc_logger_level, "Canceling generic monitor available timer for monitor %s\n", monitor->interface->name);
+	ast_sched_thread_del(cc_sched_thread, *sched_id);
+	return 0;
+}
 
 static int cc_generic_monitor_cancel_available_timer(struct ast_cc_monitor *monitor, const int core_id, int *sched_id)
 {




More information about the asterisk-commits mailing list