[Freeswitch-svn] [commit] r10633 - freeswitch/trunk/src

FreeSWITCH SVN mikej at freeswitch.org
Fri Dec 5 13:50:45 PST 2008


Author: mikej
Date: Fri Dec  5 16:50:45 2008
New Revision: 10633

Log:
FSCORE-244 ivr menu max_failures and max_timeouts now default to 3 if not specified or invalid (less than 1) values are specified

Modified:
   freeswitch/trunk/src/switch_ivr_menu.c

Modified: freeswitch/trunk/src/switch_ivr_menu.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_menu.c	(original)
+++ freeswitch/trunk/src/switch_ivr_menu.c	Fri Dec  5 16:50:45 2008
@@ -167,9 +167,17 @@
 
 	menu->inlen = digit_len;
 
-	menu->max_failures = max_failures;
+	if (max_failures > 0) {
+		menu->max_failures = max_failures;
+	} else {
+		menu->max_failures = 3;
+	}
 
-	menu->max_timeouts = max_timeouts;
+	if (max_timeouts > 0) {
+		menu->max_timeouts = max_timeouts;
+	} else {
+		menu->max_timeouts = 3;
+	}
 
 	menu->timeout = timeout;
 
@@ -736,8 +744,8 @@
 									  atoi(inter_timeout),
 									  atoi(digit_len),
 									  atoi(timeout), 
-									  strlen(max_failures)? atoi(max_failures): 1, 
-									  strlen(max_timeouts)? atoi(max_timeouts): 1, 
+									  strlen(max_failures)? atoi(max_failures): 0, 
+									  strlen(max_timeouts)? atoi(max_timeouts): 0, 
 									  xml_menu_ctx->pool);
 		/* set the menu_stack for the caller */
 		if (status == SWITCH_STATUS_SUCCESS && *menu_stack == NULL) {



More information about the Freeswitch-svn mailing list