From 93bbbe96af98a6e4ab2ae5a48e68690b44bc103c Mon Sep 17 00:00:00 2001 From: Daniel Swarbrick Date: Mon, 3 Jan 2011 13:36:20 +0100 Subject: [PATCH] Remove event_handler() altogether, since it was doing nothing anyway --- .../mod_cdr_sqlite/mod_cdr_sqlite.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/mod/event_handlers/mod_cdr_sqlite/mod_cdr_sqlite.c b/src/mod/event_handlers/mod_cdr_sqlite/mod_cdr_sqlite.c index 1eae1ab12f..efb544e049 100644 --- a/src/mod/event_handlers/mod_cdr_sqlite/mod_cdr_sqlite.c +++ b/src/mod/event_handlers/mod_cdr_sqlite/mod_cdr_sqlite.c @@ -166,16 +166,6 @@ static switch_status_t my_on_reporting(switch_core_session_t *session) } -static void event_handler(switch_event_t *event) -{ - const char *sig = switch_event_get_header(event, "Trapped-Signal"); - - if (globals.shutdown) { - return; - } -} - - static switch_state_handler_table_t state_handlers = { /*.on_init */ NULL, /*.on_routing */ NULL, @@ -290,11 +280,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_cdr_sqlite_load) load_config(pool); - if ((status = switch_event_bind(modname, SWITCH_EVENT_TRAP, SWITCH_EVENT_SUBCLASS_ANY, event_handler, NULL)) != SWITCH_STATUS_SUCCESS) { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n"); - return status; - } - switch_core_add_state_handler(&state_handlers); *module_interface = switch_loadable_module_create_module_interface(pool, modname); @@ -305,7 +290,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_cdr_sqlite_load) SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_cdr_sqlite_shutdown) { globals.shutdown = 1; - switch_event_unbind_callback(event_handler); switch_core_remove_state_handler(&state_handlers); return SWITCH_STATUS_SUCCESS;