[asterisk-commits] mmichelson: branch group/CCSS_Monitor_Restructure r242037 - in /team/group/CC...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 21 13:38:47 CST 2010


Author: mmichelson
Date: Thu Jan 21 13:38:44 2010
New Revision: 242037

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=242037
Log:
Get the new version of the status response callback written.


Modified:
    team/group/CCSS_Monitor_Restructure/include/asterisk/ccss.h
    team/group/CCSS_Monitor_Restructure/main/ccss.c

Modified: team/group/CCSS_Monitor_Restructure/include/asterisk/ccss.h
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS_Monitor_Restructure/include/asterisk/ccss.h?view=diff&rev=242037&r1=242036&r2=242037
==============================================================================
--- team/group/CCSS_Monitor_Restructure/include/asterisk/ccss.h (original)
+++ team/group/CCSS_Monitor_Restructure/include/asterisk/ccss.h Thu Jan 21 13:38:44 2010
@@ -598,6 +598,7 @@
 	 * \retval -1 on failure.
 	 */
 	int (*status_response)(struct ast_cc_monitor *monitor, const int core_id, enum ast_device_state devstate);
+	int (*status_response2)(struct cc_monitor *monitor, enum ast_device_state devstate);
 	/*!
 	 * \brief Unsuspend monitoring.
 	 *

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=242037&r1=242036&r2=242037
==============================================================================
--- team/group/CCSS_Monitor_Restructure/main/ccss.c (original)
+++ team/group/CCSS_Monitor_Restructure/main/ccss.c Thu Jan 21 13:38:44 2010
@@ -945,6 +945,7 @@
 static int cc_generic_monitor_request_cc2(struct cc_monitor *monitor, int *available_timer_id);
 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_status_response2(struct cc_monitor *monitor, 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 void cc_generic_monitor_destructor2(void *private_data);
@@ -954,6 +955,7 @@
 	.request_cc2 = cc_generic_monitor_request_cc2,
 	.suspend2 = cc_generic_monitor_suspend2,
 	.status_response = cc_generic_monitor_status_response,
+	.status_response2 = cc_generic_monitor_status_response2,
 	.unsuspend2 = cc_generic_monitor_unsuspend2,
 	.cancel_available_timer2 = cc_generic_monitor_cancel_available_timer2,
 	.destructor2 = cc_generic_monitor_destructor2,
@@ -1215,6 +1217,15 @@
 		}
 	}
 	cc_unref(generic_list, "Done with generic list in suspend callback");
+	return 0;
+}
+
+static int cc_generic_monitor_status_response2(struct cc_monitor *monitor, enum ast_device_state devstate)
+{
+	/* The generic monitor will never issue a status request of the other side's agent.
+	 * If this somehow gets called, something really fishy is going on.
+	 */
+	ast_log(LOG_WARNING, "Why has a generic monitor's status_response callback been called? CoreID is %d\n", monitor->core_id);
 	return 0;
 }
 




More information about the asterisk-commits mailing list