[asterisk-commits] rmudgett: branch 1.8 r321924 - /branches/1.8/main/ccss.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jun 3 16:49:21 CDT 2011


Author: rmudgett
Date: Fri Jun  3 16:49:17 2011
New Revision: 321924

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=321924
Log:
Be more explicit for CCSS generic device state event subscription.

Make CCSS generic device state event subscription specify the
AST_EVENT_IE_STATE ie exists to be safe.

Modified:
    branches/1.8/main/ccss.c

Modified: branches/1.8/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/ccss.c?view=diff&rev=321924&r1=321923&r2=321924
==============================================================================
--- branches/1.8/main/ccss.c (original)
+++ branches/1.8/main/ccss.c Fri Jun  3 16:49:17 2011
@@ -1135,9 +1135,11 @@
 		return NULL;
 	}
 
-	if (!(generic_list->sub = ast_event_subscribe(AST_EVENT_DEVICE_STATE, generic_monitor_devstate_cb,
-				"Requesting CC", NULL, AST_EVENT_IE_DEVICE, AST_EVENT_IE_PLTYPE_STR,
-				monitor->interface->device_name, AST_EVENT_IE_END))) {
+	if (!(generic_list->sub = ast_event_subscribe(AST_EVENT_DEVICE_STATE,
+		generic_monitor_devstate_cb, "Requesting CC", NULL,
+		AST_EVENT_IE_DEVICE, AST_EVENT_IE_PLTYPE_STR, monitor->interface->device_name,
+		AST_EVENT_IE_STATE, AST_EVENT_IE_PLTYPE_EXISTS,
+		AST_EVENT_IE_END))) {
 		cc_unref(generic_list, "Failed to subscribe to device state");
 		return NULL;
 	}
@@ -2523,10 +2525,11 @@
 	ast_str_set(&str, 0, "Agent monitoring %s device state since it is busy\n",
 		agent->device_name);
 
-	if (!(generic_pvt->sub = ast_event_subscribe(
-			AST_EVENT_DEVICE_STATE, generic_agent_devstate_cb, ast_str_buffer(str), agent,
-			AST_EVENT_IE_DEVICE, AST_EVENT_IE_PLTYPE_STR, agent->device_name,
-			AST_EVENT_IE_END))) {
+	if (!(generic_pvt->sub = ast_event_subscribe(AST_EVENT_DEVICE_STATE,
+		generic_agent_devstate_cb, ast_str_buffer(str), agent,
+		AST_EVENT_IE_DEVICE, AST_EVENT_IE_PLTYPE_STR, agent->device_name,
+		AST_EVENT_IE_STATE, AST_EVENT_IE_PLTYPE_EXISTS,
+		AST_EVENT_IE_END))) {
 		return -1;
 	}
 	return 0;




More information about the asterisk-commits mailing list