mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 12:40:17 +00:00
FS-7523: [mod_json_cdr] don't bind events before we configure the module
This commit is contained in:
parent
1b322bd952
commit
7382cecf8c
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user