summaryrefslogtreecommitdiff
path: root/main/ccss.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2011-06-03 21:49:58 +0000
committerRichard Mudgett <rmudgett@digium.com>2011-06-03 21:49:58 +0000
commit31bcafab5bbdba6533ff50a2ebeb3e0ab1d0cc92 (patch)
tree891747a8e581edc62d5e7383f36b392622a517bd /main/ccss.c
parent85aa126b34159ed463acc716d52848714936f4db (diff)
Merged revisions 321924 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r321924 | rmudgett | 2011-06-03 16:49:17 -0500 (Fri, 03 Jun 2011) | 5 lines 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/trunk@321925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/ccss.c')
-rw-r--r--main/ccss.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/main/ccss.c b/main/ccss.c
index 3c2f5356c..2db5f338b 100644
--- a/main/ccss.c
+++ b/main/ccss.c
@@ -1241,9 +1241,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;
}
@@ -2629,10 +2631,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;