[Freeswitch-svn] [commit] r12140 - freeswitch/trunk/src/mod/languages/mod_spidermonkey

FreeSWITCH SVN anthm at freeswitch.org
Wed Feb 18 08:46:21 PST 2009


Author: anthm
Date: Wed Feb 18 10:46:20 2009
New Revision: 12140

Log:
change abort to graceful failure

Modified:
   freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c

Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	(original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	Wed Feb 18 10:46:20 2009
@@ -1082,8 +1082,6 @@
 			JS_SetPrivate(cx, DTMF, ddtmf);
 			JS_DefineProperties(cx, DTMF, dtmf_props);
 			JS_DefineFunctions(cx, DTMF, dtmf_methods);
-		} else {
-			abort();
 		}
 	}
 	return DTMF;
@@ -1131,11 +1129,14 @@
 	case SWITCH_INPUT_TYPE_DTMF:
 		{
 			switch_dtmf_t *dtmf = (switch_dtmf_t *) input;
-
+			
 			if (dtmf) {
 				if ((Event = new_js_dtmf(dtmf, "_XX_DTMF_XX_", cb_state->cx, cb_state->obj))) {
 					argv[argc++] = STRING_TO_JSVAL(JS_NewStringCopyZ(cb_state->cx, "dtmf"));
 					argv[argc++] = OBJECT_TO_JSVAL(Event);
+				} else {
+					jss->stack_depth--;
+					return SWITCH_STATUS_FALSE;
 				}
 			}
 		}



More information about the Freeswitch-svn mailing list