summaryrefslogtreecommitdiff
path: root/res/ari/resource_channels.c
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2014-04-18 20:09:24 +0000
committerJonathan Rose <jrose@digium.com>2014-04-18 20:09:24 +0000
commitb9d7dfcc62c80d2b2827dd7b70701dfb21512c13 (patch)
tree5d564284aeb95084327ad944a2e358829e67ba6a /res/ari/resource_channels.c
parent06657c92e61340a9bc3e0d89fa676f93e6581ef1 (diff)
ARI: Make bridges/{bridgeID}/play queue sound files
Previously multiple play actions against a bridge at one time would cause the sounds to play simultaneously on the bridge. Now if a sound is already playing, the play action will queue playback to occur after the completion of other sounds currently on the queue. (closes issue ASTERISK-22677) Reported by: John Bigelow Review: https://reviewboard.asterisk.org/r/3379/ ........ Merged revisions 412639 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/ari/resource_channels.c')
-rw-r--r--res/ari/resource_channels.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/res/ari/resource_channels.c b/res/ari/resource_channels.c
index 9d127b2ea..30ced1b2f 100644
--- a/res/ari/resource_channels.c
+++ b/res/ari/resource_channels.c
@@ -411,9 +411,9 @@ static void ari_channels_handle_play(
return;
}
- ast_asprintf(&playback_url, "/playback/%s",
- stasis_app_playback_get_id(playback));
- if (!playback_url) {
+ if (ast_asprintf(&playback_url, "/playback/%s",
+ stasis_app_playback_get_id(playback)) == -1) {
+ playback_url = NULL;
ast_ari_response_error(
response, 500, "Internal Server Error",
"Out of memory");
@@ -579,8 +579,9 @@ void ast_ari_channels_record(struct ast_variable *headers,
ast_uri_encode(args->name, uri_encoded_name, uri_name_maxlen,
ast_uri_http);
- ast_asprintf(&recording_url, "/recordings/live/%s", uri_encoded_name);
- if (!recording_url) {
+ if (ast_asprintf(&recording_url, "/recordings/live/%s",
+ uri_encoded_name) == -1) {
+ recording_url = NULL;
ast_ari_response_error(
response, 500, "Internal Server Error",
"Out of memory");