[Asterisk-code-review] res_ari: Fix wrong media uri handle for channel play (asterisk[18])
sungtae kim
asteriskteam at digium.com
Wed Dec 16 10:40:16 CST 2020
sungtae kim has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/15252 )
Change subject: res_ari: Fix wrong media uri handle for channel play
......................................................................
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
---
M res/res_stasis_playback.c
1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/52/15252/1
diff --git a/res/res_stasis_playback.c b/res/res_stasis_playback.c
index 7665d5f..d60a49a 100644
--- a/res/res_stasis_playback.c
+++ b/res/res_stasis_playback.c
@@ -489,6 +489,13 @@
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);
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15252
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: I6691c640247a51ad15f23e4a203ca8430809bafe
Gerrit-Change-Number: 15252
Gerrit-PatchSet: 1
Gerrit-Owner: sungtae kim <pchero21 at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20201216/6485bddc/attachment.html>
More information about the asterisk-code-review
mailing list