mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
This update fixes the problem reported in bug 8551; that ast_app_getdata() behaves differently in trunk for the case of a null prompt.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
12
main/app.c
12
main/app.c
@@ -115,14 +115,16 @@ int ast_app_getdata(struct ast_channel *c, const char *prompt, char *s, int maxl
|
|||||||
if (maxlen)
|
if (maxlen)
|
||||||
s[0] = '\0';
|
s[0] = '\0';
|
||||||
|
|
||||||
if (ast_strlen_zero(prompt))
|
if (!prompt)
|
||||||
return -1;
|
prompt="";
|
||||||
|
|
||||||
filename = ast_strdupa(prompt);
|
filename = ast_strdupa(prompt);
|
||||||
while ((front = strsep(&filename, "&"))) {
|
while ((front = strsep(&filename, "&"))) {
|
||||||
res = ast_streamfile(c, front, c->language);
|
if (!ast_strlen_zero(front)) {
|
||||||
if (res)
|
res = ast_streamfile(c, front, c->language);
|
||||||
continue;
|
if (res)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (ast_strlen_zero(filename)) {
|
if (ast_strlen_zero(filename)) {
|
||||||
/* set timeouts for the last prompt */
|
/* set timeouts for the last prompt */
|
||||||
fto = c->pbx ? c->pbx->rtimeout * 1000 : 6000;
|
fto = c->pbx ? c->pbx->rtimeout * 1000 : 6000;
|
||||||
|
Reference in New Issue
Block a user