summaryrefslogtreecommitdiff
path: root/res/res_stasis_device_state.c
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2014-01-28 19:19:08 +0000
committerKinsey Moore <kmoore@digium.com>2014-01-28 19:19:08 +0000
commit3eae87fdfe39f988674f1faeecb3ce592b514962 (patch)
tree5a72969e5c71ee8144f0bd22eab6d0e8eca4c839 /res/res_stasis_device_state.c
parent601692a7e4cdb9e9b9ee128d66d7b36e632184be (diff)
ARI: Make double subscribe respond with success
Currently, attempting to subscribe an application to a device state that it has already subscribed to will generate a 500 error response. This will now be treated as a subscription refresh even though ARI subscriptions don't currently support lifetimes and will respond with the normal response for a successful subscription (200 OK). (closes issue ASTERISK-23143) Reported by: Matt Jordan ........ Merged revisions 406775 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@406778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_stasis_device_state.c')
-rw-r--r--res/res_stasis_device_state.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_stasis_device_state.c b/res/res_stasis_device_state.c
index 01b10d3ec..0130909dd 100644
--- a/res/res_stasis_device_state.c
+++ b/res/res_stasis_device_state.c
@@ -326,8 +326,8 @@ static int subscribe_device_state(struct stasis_app *app, void *obj)
ast_debug(3, "Subscribing to device %s", sub->device_name);
if (is_subscribed_device_state(app, sub->device_name)) {
- ast_log(LOG_WARNING, "Already subscribed to %s\n", sub->device_name);
- return -1;
+ ast_debug(3, "App %s is already subscribed to %s\n", stasis_app_name(app), sub->device_name);
+ return 0;
}
if (!(sub->sub = stasis_subscribe(