Skip to content
Snippets Groups Projects
Commit 7ddfe12a authored by Matthew Jordan's avatar Matthew Jordan
Browse files

res_stasis_device_state: Set resource type for subscriptions to deviceState

The documentation for ARI already specifies that the device state resource when
used for subscribing for events is "deviceState", not "device_state". The code,
however, used "device_state"; although this was inconsistent as well in doxygen
comments in resource_applications.

Because the actual resource being subscribed to is /deviceStates/{device}/, it
makes sense for the resource type specifier to be deviceState.

Note that the key value in the events is still "device_state".
........

Merged revisions 404437 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 72c282cc
No related branches found
No related tags found
No related merge requests found
...@@ -88,7 +88,7 @@ void ast_ari_applications_subscribe(struct ast_variable *headers, struct ast_ari ...@@ -88,7 +88,7 @@ void ast_ari_applications_subscribe(struct ast_variable *headers, struct ast_ari
struct ast_ari_applications_unsubscribe_args { struct ast_ari_applications_unsubscribe_args {
/*! \brief Application's name */ /*! \brief Application's name */
const char *application_name; const char *application_name;
/*! \brief Array of URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, device_state:{deviceName} */ /*! \brief Array of URI for event source (channel:{channelId}, bridge:{bridgeId}, endpoint:{tech}/{resource}, deviceState:{deviceName} */
const char **event_source; const char **event_source;
/*! \brief Length of event_source array. */ /*! \brief Length of event_source array. */
size_t event_source_count; size_t event_source_count;
......
...@@ -39,7 +39,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") ...@@ -39,7 +39,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
/*! Scheme for custom device states */ /*! Scheme for custom device states */
#define DEVICE_STATE_SCHEME_STASIS "Stasis:" #define DEVICE_STATE_SCHEME_STASIS "Stasis:"
/*! Scheme for device state subscriptions */ /*! Scheme for device state subscriptions */
#define DEVICE_STATE_SCHEME_SUB "device_state:" #define DEVICE_STATE_SCHEME_SUB "deviceState:"
/*! Number of hash buckets for device state subscriptions */ /*! Number of hash buckets for device state subscriptions */
#define DEVICE_STATE_BUCKETS 37 #define DEVICE_STATE_BUCKETS 37
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment