[asterisk-commits] kmoore: trunk r406778 - in /trunk: ./ res/res_stasis_device_state.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 28 13:19:11 CST 2014


Author: kmoore
Date: Tue Jan 28 13:19:08 2014
New Revision: 406778

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=406778
Log:
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

Modified:
    trunk/   (props changed)
    trunk/res/res_stasis_device_state.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/res/res_stasis_device_state.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_stasis_device_state.c?view=diff&rev=406778&r1=406777&r2=406778
==============================================================================
--- trunk/res/res_stasis_device_state.c (original)
+++ trunk/res/res_stasis_device_state.c Tue Jan 28 13:19:08 2014
@@ -326,8 +326,8 @@
 	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(




More information about the asterisk-commits mailing list