[asterisk-commits] murf: trunk r48388 - /trunk/main/app.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Dec 11 10:00:36 MST 2006


Author: murf
Date: Mon Dec 11 11:00:36 2006
New Revision: 48388

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48388
Log:
This update fixes the problem reported in bug 8551; that ast_app_getdata() behaves differently in trunk for the case of a null prompt.

Modified:
    trunk/main/app.c

Modified: trunk/main/app.c
URL: http://svn.digium.com/view/asterisk/trunk/main/app.c?view=diff&rev=48388&r1=48387&r2=48388
==============================================================================
--- trunk/main/app.c (original)
+++ trunk/main/app.c Mon Dec 11 11:00:36 2006
@@ -115,14 +115,16 @@
 	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;



More information about the asterisk-commits mailing list