aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2006-12-11 17:00:36 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2006-12-11 17:00:36 +0000
commit75b14fe36b1ab92f68ee0e1bb17298ef8f44c061 (patch)
treec1941ec82007241a4241ae46af3894e4ac00bcf6
parent101927e5b1325168ab7f2d20742cdbbebeb0519d (diff)
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: http://svn.digium.com/svn/asterisk/trunk@48388 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/app.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/main/app.c b/main/app.c
index 91365f37d..b2e2b8d5e 100644
--- a/main/app.c
+++ b/main/app.c
@@ -115,14 +115,16 @@ int ast_app_getdata(struct ast_channel *c, const char *prompt, char *s, int maxl
if (maxlen)
s[0] = '\0';
- if (ast_strlen_zero(prompt))
- return -1;
+ if (!prompt)
+ prompt="";
filename = ast_strdupa(prompt);
while ((front = strsep(&filename, "&"))) {
- res = ast_streamfile(c, front, c->language);
- if (res)
- continue;
+ if (!ast_strlen_zero(front)) {
+ res = ast_streamfile(c, front, c->language);
+ if (res)
+ continue;
+ }
if (ast_strlen_zero(filename)) {
/* set timeouts for the last prompt */
fto = c->pbx ? c->pbx->rtimeout * 1000 : 6000;