[asterisk-commits] mmichelson: branch group/CCSS r218092 - /team/group/CCSS/main/ccss.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Sep 11 11:55:13 CDT 2009


Author: mmichelson
Date: Fri Sep 11 11:55:09 2009
New Revision: 218092

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=218092
Log:
Solidify generic monitor suspension logic more.


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

Modified: team/group/CCSS/main/ccss.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=218092&r1=218091&r2=218092
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Fri Sep 11 11:55:09 2009
@@ -1502,11 +1502,17 @@
 
 static int cc_generic_monitor_suspend(struct ast_cc_monitor *monitor, const int core_id)
 {
-	/* Generic monitors don't do anything special when a request
-	 * for monitor suspension occurs. The parent link will be
-	 * marked as being suspended, and that can factor into the
-	 * the device monitor's decisions.
-	 */
+	if (monitor->saved_link && monitor->saved_link->core_id == core_id) {
+		/* The link we signaled availability on has become suspended. We need
+		 * to NULL out our saved link in this case no matter what, and if the device
+		 * is available, we need call the function to announce availability in case
+		 * there is another link on which we may announce the availability.
+		 */
+		monitor->saved_link = NULL;
+		if (monitor->callbacks->status_request(monitor, core_id) == AST_DEVICE_NOT_INUSE) {
+			ast_cc_monitor_announce_availability(monitor);
+		}
+	}
 	return 0;
 }
 




More information about the asterisk-commits mailing list