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;