FS-7523: [mod_json_cdr] don't bind events before we configure the module

This commit is contained in:
Michael Jerris 2015-05-04 11:46:30 -04:00
parent 1b322bd952
commit 7382cecf8c
1 changed files with 5 additions and 5 deletions

View File

@ -579,11 +579,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_json_cdr_load)
memset(&globals, 0, sizeof(globals));
if (switch_event_bind_removable(modname, SWITCH_EVENT_TRAP, SWITCH_EVENT_SUBCLASS_ANY, event_handler, NULL, &globals.node) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
return SWITCH_STATUS_GENERR;
}
globals.log_http_and_disk = 0;
globals.log_errors_to_disk = SWITCH_TRUE;
globals.log_b = 1;
@ -726,6 +721,11 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_json_cdr_load)
set_json_cdr_log_dirs();
if (switch_event_bind_removable(modname, SWITCH_EVENT_TRAP, SWITCH_EVENT_SUBCLASS_ANY, event_handler, NULL, &globals.node) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
return SWITCH_STATUS_GENERR;
}
switch_xml_free(xml);
return status;
}