[Asterisk-code-review] say.c: Prevent erroneous failures with 'say' family of functions. (asterisk[16])
Sean Bright
asteriskteam at digium.com
Wed Jan 12 13:36:30 CST 2022
Sean Bright has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/17865 )
Change subject: say.c: Prevent erroneous failures with 'say' family of functions.
......................................................................
say.c: Prevent erroneous failures with 'say' family of functions.
A regression was introduced in ASTERISK~29531 that caused 'say'
functions to fail when file lists that would previously have
succeeded.
We now explicitly check for the empty string to restore the previous
behavior.
ASTERISK-29859 #close
Change-Id: Ia2e5769868e2792313c2d7c07996efe009c6f8d5
---
M main/say.c
1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/65/17865/1
diff --git a/main/say.c b/main/say.c
index 54aefe0..56e6b8d 100644
--- a/main/say.c
+++ b/main/say.c
@@ -180,6 +180,13 @@
if (!filenames) {
return -1;
}
+
+ /* No filenames to play? Return success so we don't hang up erroneously */
+ if (ast_str_strlen(filenames) == 0) {
+ ast_free(filenames);
+ return 0;
+ }
+
files = ast_str_buffer(filenames);
while ((fn = strsep(&files, "&"))) {
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/17865
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ia2e5769868e2792313c2d7c07996efe009c6f8d5
Gerrit-Change-Number: 17865
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean at seanbright.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220112/ceadb4c1/attachment.html>
More information about the asterisk-code-review
mailing list