]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
remove old code
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 31 Mar 2009 23:56:47 +0000 (23:56 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 31 Mar 2009 23:56:47 +0000 (23:56 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12860 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/languages/mod_lua/mod_lua.cpp
src/mod/languages/mod_perl/mod_perl.c
src/mod/languages/mod_python/mod_python.c
src/mod/languages/mod_spidermonkey/mod_spidermonkey.c

index 15795f64ffe956765303c37c7ea6a95cc1872911..44686df707ee5d1fe9e526d48726c150efc68487 100644 (file)
@@ -438,38 +438,11 @@ SWITCH_STANDARD_API(lua_api_function)
        return SWITCH_STATUS_SUCCESS;
 }
 
-static void message_query_handler(switch_event_t *event)
-{
-       char *account = switch_event_get_header(event, "message-account");
-
-       if (account) {
-               char *path, *cmd;
-
-               path = switch_mprintf("%s%smwi.lua", SWITCH_GLOBAL_dirs.script_dir, SWITCH_PATH_SEPARATOR);
-               switch_assert(path != NULL);
-
-               if (switch_file_exists(path, NULL) == SWITCH_STATUS_SUCCESS) {
-                       cmd = switch_mprintf("%s %s", path, account);
-                       switch_assert(cmd != NULL);
-                       lua_thread(cmd);
-                       switch_safe_free(cmd);
-               }
-
-               switch_safe_free(path);
-       }
-}
-
 SWITCH_MODULE_LOAD_FUNCTION(mod_lua_load)
 {
        switch_api_interface_t *api_interface;
        switch_application_interface_t *app_interface;
 
-       if (switch_event_bind_removable(modname, SWITCH_EVENT_MESSAGE_QUERY, SWITCH_EVENT_SUBCLASS_ANY, message_query_handler, NULL, &globals.node)
-               != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
-               return SWITCH_STATUS_GENERR;
-       }
-
        /* connect my internal structure to the blank pointer passed to me */
        *module_interface = switch_loadable_module_create_module_interface(pool, modname);
 
index c73e820c3c2dd2bc2cef511a1f1a18c1b69d5e3e..0616078208cf1759eac5e79039f6470da94798b2 100644 (file)
@@ -429,24 +429,6 @@ static switch_xml_t perl_fetch(const char *section,
        return xml;
 }
 
-static void message_query_handler(switch_event_t *event)
-{
-       char *account = switch_event_get_header(event, "message-account");
-       
-       if (account) {
-               char path[512], *cmd;
-
-               switch_snprintf(path, sizeof(path), "%s%smwi.pl", SWITCH_GLOBAL_dirs.script_dir, SWITCH_PATH_SEPARATOR);
-               
-               if (switch_file_exists(path, NULL) == SWITCH_STATUS_SUCCESS) {
-                       cmd = switch_mprintf("%s %s", path, account);
-                       switch_assert(cmd != NULL);
-                       perl_thread(cmd);
-                       switch_safe_free(cmd);
-               }
-       }
-}
-
 static switch_status_t do_config(void)
 {
        char *cf = "perl.conf";
@@ -491,12 +473,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_perl_load)
 
        globals.pool = pool;
 
-       if (switch_event_bind_removable(modname, SWITCH_EVENT_MESSAGE_QUERY, SWITCH_EVENT_SUBCLASS_ANY, message_query_handler, NULL, &globals.node)
-               != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
-               return SWITCH_STATUS_GENERR;
-       }
-
        if (!(my_perl = perl_alloc())) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not allocate perl interpreter\n");
                return SWITCH_STATUS_MEMERR;
index 782fe67ce1f8349fc812d1342a50309329df9511..e31a8275dfaa79d39026db81a6e6519ecbfb24e4 100644 (file)
@@ -333,26 +333,6 @@ int py_thread(const char *text)
        return 0;
 }
 
-static void message_query_handler(switch_event_t *event)
-{
-       char *account = switch_event_get_header(event, "message-account");
-
-       if (account) {
-               char *path, *cmd;
-               
-               path = switch_mprintf("%s%smwi.py", SWITCH_GLOBAL_dirs.script_dir, SWITCH_PATH_SEPARATOR);
-               switch_assert(path != NULL);
-               
-               if (switch_file_exists(path, NULL) == SWITCH_STATUS_SUCCESS) {
-                       cmd = switch_mprintf("%s %s", path, account);
-                       switch_assert(cmd != NULL);
-                       py_thread(cmd);
-                       switch_safe_free(cmd);
-               }
-               switch_safe_free(path);
-       }
-}
-
 SWITCH_STANDARD_API(launch_python)
 {
 
@@ -372,12 +352,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_python_load)
        switch_application_interface_t *app_interface;
        char *pp = getenv("PYTHONPATH");
 
-       if (switch_event_bind_removable(modname, SWITCH_EVENT_MESSAGE_QUERY, SWITCH_EVENT_SUBCLASS_ANY, message_query_handler, NULL, &globals.node)
-               != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
-               return SWITCH_STATUS_GENERR;
-       }
-
        if (pp) {
                char *path = switch_mprintf("%s:%s", pp, SWITCH_GLOBAL_dirs.script_dir);
                setenv("PYTHONPATH", path, 1);
index 6c2de3d0e1eaf1da93603f2aed6d0147d7f5bdc6..4750b8551f01e095741f2e38f046ed48fcb13f00 100644 (file)
@@ -3695,27 +3695,6 @@ SWITCH_STANDARD_API(launch_async)
        return SWITCH_STATUS_SUCCESS;
 }
 
-static void message_query_handler(switch_event_t *event)
-{
-       char *account = switch_event_get_header(event, "message-account");
-
-       if (account) {
-               char *path, *cmd;
-
-               path = switch_mprintf("%s%smwi.js", SWITCH_GLOBAL_dirs.script_dir, SWITCH_PATH_SEPARATOR);
-               switch_assert(path != NULL);
-
-               if (switch_file_exists(path, NULL) == SWITCH_STATUS_SUCCESS) {
-                       cmd = switch_mprintf("%s %s", path, account);
-                       switch_assert(cmd != NULL);
-                       js_thread_launch(cmd);
-                       switch_safe_free(cmd);
-               }
-
-               switch_safe_free(path);
-       }
-}
-
 SWITCH_MODULE_LOAD_FUNCTION(mod_spidermonkey_load)
 {
        switch_application_interface_t *app_interface;
@@ -3725,12 +3704,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_spidermonkey_load)
                return status;
        }
 
-       if (switch_event_bind_removable(modname, SWITCH_EVENT_MESSAGE_QUERY, SWITCH_EVENT_SUBCLASS_ANY, message_query_handler, NULL, &globals.node)
-               != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
-               return SWITCH_STATUS_GENERR;
-       }
-
        /* connect my internal structure to the blank pointer passed to me */
        *module_interface = switch_loadable_module_create_module_interface(pool, modname);
        SWITCH_ADD_API(js_run_interface, "jsrun", "run a script", launch_async, "jsrun <script> [additional_vars [...]]");