[Freeswitch-trunk] [commit] r7004 - freeswitch/trunk/src/mod/languages/mod_spidermonkey
Freeswitch SVN
anthm at freeswitch.org
Fri Dec 28 15:52:48 EST 2007
Author: anthm
Date: Fri Dec 28 15:52:48 2007
New Revision: 7004
Modified:
freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
Log:
update
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 Fri Dec 28 15:52:48 2007
@@ -764,31 +764,31 @@
/*********************************************************************************/
static JSBool dtmf_construct(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval)
{
- if (argc > 0) {
- switch_dtmf_t *dtmf;
- int32 duration = SWITCH_DEFAULT_DTMF_DURATION;
- char *ename;
- if (argc > 0) {
- ename = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
- } else {
- eval_some_js("~throw new Error(\"Invalid Args\");", cx, obj, rval);
- return JS_FALSE;
- }
+ switch_dtmf_t *dtmf;
+ int32 duration = SWITCH_DEFAULT_DTMF_DURATION;
+ char *ename;
- if (argc > 1) {
- JS_ValueToInt32(cx, argv[1], &duration);
- if (duration <= 0) {
- duration = SWITCH_DEFAULT_DTMF_DURATION;
- }
- }
+ if (argc > 0) {
+ ename = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
+ } else {
+ eval_some_js("~throw new Error(\"Invalid Args\");", cx, obj, rval);
+ return JS_FALSE;
+ }
- if ((dtmf = malloc(sizeof(*dtmf)))) {
- JS_SetPrivate(cx, obj, dtmf);
- return JS_TRUE;
+ if (argc > 1) {
+ JS_ValueToInt32(cx, argv[1], &duration);
+ if (duration <= 0) {
+ duration = SWITCH_DEFAULT_DTMF_DURATION;
}
}
+ if ((dtmf = malloc(sizeof(*dtmf)))) {
+ JS_SetPrivate(cx, obj, dtmf);
+ return JS_TRUE;
+ }
+
+
return JS_FALSE;
}
More information about the Freeswitch-trunk
mailing list