[svn-commits] mmichelson: branch group/CCSS r216639 - in /team/group/CCSS: include/asterisk...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Sep 4 16:21:07 CDT 2009
Author: mmichelson
Date: Fri Sep 4 16:21:04 2009
New Revision: 216639
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=216639
Log:
Add cautionary note to ccss.c about potential race condition.
Remove some unnecessary struct fields.
Modified:
team/group/CCSS/include/asterisk/ccss.h
team/group/CCSS/main/ccss.c
Modified: team/group/CCSS/include/asterisk/ccss.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/include/asterisk/ccss.h?view=diff&rev=216639&r1=216638&r2=216639
==============================================================================
--- team/group/CCSS/include/asterisk/ccss.h (original)
+++ team/group/CCSS/include/asterisk/ccss.h Fri Sep 4 16:21:04 2009
@@ -472,10 +472,6 @@
struct ast_cc_monitor *parent;
/* The child monitor (may be extension or device monitor) */
struct ast_cc_monitor *child;
- /* The weight associated with this link. Lower weights have higher
- * priority
- */
- unsigned long weight;
/* Boolean indicator of whether the link is currently suspended */
unsigned char is_suspended;
/* Which instance of the core state machine does this link correspond
@@ -522,13 +518,6 @@
* become unsuspended
*/
struct ast_cc_monitor_link *saved_link;
- /* The current state of the device monitor's device.
- * Even though not all device monitors subscribe
- * to device state, the monitors should be able to
- * translate the state information into this type
- * for uniformity.
- */
- enum ast_device_state state;
/*! The name of the device/extension being monitored */
char name[1];
};
Modified: team/group/CCSS/main/ccss.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=216639&r1=216638&r2=216639
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Fri Sep 4 16:21:04 2009
@@ -1452,6 +1452,11 @@
* the next time that the device state *changes* to "not in use" that will be indication that
* the phone has been used and that we may try ringing the phone again.
*/
+
+ /* XXX Is there a race condition here? If we happen to see that the status is not "not in use" but then
+ * the device state changes to "not in use" before we are able to subscribe to the device state event, then
+ * will that mean a missed opportunity?
+ */
if (service == AST_CC_CCBS && (monitor->callbacks->status_request(monitor, core_id) == AST_DEVICE_NOT_INUSE)) {
return ast_cc_monitor_announce_availability(monitor);
}
More information about the svn-commits
mailing list