From: Richard Mudgett Date: Fri, 3 Jun 2011 21:49:17 +0000 (+0000) Subject: Be more explicit for CCSS generic device state event subscription. X-Git-Tag: 1.8.5-rc1~11^2~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=549f79b9f308239b681ae2d1d676a3fc04f5292e;p=thirdparty%2Fasterisk.git 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. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321924 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/ccss.c b/main/ccss.c index 5a4b74f2b2..e3e2ec1dc6 100644 --- a/main/ccss.c +++ b/main/ccss.c @@ -1135,9 +1135,11 @@ static struct generic_monitor_instance_list *create_new_generic_list(struct ast_ 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 @@ static int cc_generic_agent_start_monitoring(struct ast_cc_agent *agent) 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;