From: Michael Jerris Date: Mon, 4 May 2015 19:58:48 +0000 (-0400) Subject: FS-7523: [mod_json_cdr] don't install state handlers before we configure the module X-Git-Tag: v1.4.19~6^2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b79637036a618a000cf9fdffaa79a61844e71a0;p=thirdparty%2Ffreeswitch.git FS-7523: [mod_json_cdr] don't install state handlers before we configure the module --- diff --git a/src/mod/event_handlers/mod_json_cdr/mod_json_cdr.c b/src/mod/event_handlers/mod_json_cdr/mod_json_cdr.c index 5eacd6eacb..7e1383aa71 100644 --- a/src/mod/event_handlers/mod_json_cdr/mod_json_cdr.c +++ b/src/mod/event_handlers/mod_json_cdr/mod_json_cdr.c @@ -572,11 +572,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_json_cdr_load) switch_xml_t cfg, xml, settings, param; switch_status_t status = SWITCH_STATUS_SUCCESS; - /* test global state handlers */ - switch_core_add_state_handler(&state_handlers); - - *module_interface = switch_loadable_module_create_module_interface(pool, modname); - memset(&globals, 0, sizeof(globals)); globals.log_http_and_disk = 0; @@ -726,6 +721,11 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_json_cdr_load) return SWITCH_STATUS_GENERR; } + /* test global state handlers */ + switch_core_add_state_handler(&state_handlers); + + *module_interface = switch_loadable_module_create_module_interface(pool, modname); + switch_xml_free(xml); return status; }