mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
res_ari: Fix wrong media uri handle for channel play
Fixed wrong null object handle in /channels/<channel_id>/play request handler. ASTERISK-29188 Change-Id: I6691c640247a51ad15f23e4a203ca8430809bafe
This commit is contained in:
committed by
George Joseph
parent
7a6cfde4db
commit
4b450b4334
@@ -489,6 +489,13 @@ struct stasis_app_playback *stasis_app_control_play_uri(
|
||||
for (i = 0; i < media_count; i++) {
|
||||
char *media_uri;
|
||||
|
||||
if (ast_strlen_zero(media[i])) {
|
||||
ast_log(LOG_ERROR, "Attempted to play media on channel '%s' but no media URI was provided.\n",
|
||||
stasis_app_control_get_channel_id(control));
|
||||
ao2_ref(playback, -1);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
media_uri = ast_malloc(strlen(media[i]) + 1);
|
||||
if (!media_uri) {
|
||||
ao2_ref(playback, -1);
|
||||
|
Reference in New Issue
Block a user