[asterisk-commits] mmichelson: branch group/CCSS r217909 - /team/group/CCSS/main/ccss.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Sep 10 17:30:06 CDT 2009
Author: mmichelson
Date: Thu Sep 10 17:30:00 2009
New Revision: 217909
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=217909
Log:
Add more suspension logic.
This makes the process a bit more ... snappy!
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=217909&r1=217908&r2=217909
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Thu Sep 10 17:30:00 2009
@@ -1363,6 +1363,7 @@
}
ast_assert(link_iter->child != NULL);
ast_assert(link_iter->child->callbacks != NULL);
+ link_iter->is_suspended = 1;
link_iter->child->callbacks->suspend(link_iter->child, core_id);
}
return 0;
@@ -1394,6 +1395,7 @@
}
ast_assert(link_iter->child != NULL);
ast_assert(link_iter->child->callbacks != NULL);
+ link_iter->is_suspended = 0;
link_iter->child->callbacks->unsuspend(link_iter->child, core_id);
}
return 0;
@@ -1515,9 +1517,13 @@
static int cc_generic_monitor_unsuspend(struct ast_cc_monitor *monitor, const int core_id)
{
- /* Since we don't suspend a generic monitor, we can't really
- * unsuspend it either.
- */
+ /* When a generic monitor becomes unsuspended, we should do a status request
+ * to see if the device is available. That way, if it is, we can trigger an
+ * immediate state change
+ */
+ 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