]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 2 Apr 2007 23:34:58 +0000 (23:34 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 2 Apr 2007 23:34:58 +0000 (23:34 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4835 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/languages/mod_spidermonkey/mod_spidermonkey.c

index bcf4a1689214a98c75870627e339f58cb68ddf0b..7169852abe22fe78bbc761e18d10247ef73e3d93 100644 (file)
@@ -2663,7 +2663,6 @@ static void js_parse_and_execute(switch_core_session_t *session, char *input_cod
                for (y = 0; y < argc; y++) {
                        snprintf(buf, sizeof(buf), "~argv[%d] = \"%s\";", x++, argv[y]);
                        eval_some_js(buf, cx, javascript_global_object, &rval);
-
                }
        }
 
@@ -2764,10 +2763,13 @@ static void  message_query_handler(switch_event_t *event)
        if (account) {
                char *text;
 
-               text = switch_mprintf("mwi.js %s", account);
+               text = switch_mprintf("%s%smwi.js", SWITCH_GLOBAL_dirs.script_dir, SWITCH_PATH_SEPARATOR);
                assert(text != NULL);
 
-               js_thread_launch(text);
+               if (switch_file_exists(text) == SWITCH_STATUS_SUCCESS) {
+                       js_thread_launch(text);
+               }
+
                free(text);
        }