FS-5914 --resolve

上级 9f98ccc1
......@@ -64,6 +64,7 @@ static struct {
uint32_t enable_ssl_verifyhost;
int encode;
int log_http_and_disk;
switch_bool_t log_errors_to_disk;
int log_b;
int prefix_a;
int disable100continue;
......@@ -386,6 +387,7 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
curl_handle = NULL;
/* if we are here the web post failed for some reason */
if (globals.log_errors_to_disk) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to post to web server, writing to file\n");
for (err_dir_index = 0; err_dir_index < globals.err_dir_count; err_dir_index++) {
......@@ -416,6 +418,9 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
switch_safe_free(path);
}
}
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to post to web server, not writing to file\n");
}
}
success:
status = SWITCH_STATUS_SUCCESS;
......@@ -484,6 +489,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_json_cdr_load)
}
globals.log_http_and_disk = 0;
globals.log_errors_to_disk = SWITCH_TRUE;
globals.log_b = 1;
globals.disable100continue = 0;
globals.pool = pool;
......@@ -513,6 +519,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_json_cdr_load)
}
} else if (!strcasecmp(var, "log-http-and-disk")) {
globals.log_http_and_disk = switch_true(val);
} else if (!strcasecmp(var, "log-errors-to-disk")) {
globals.log_errors_to_disk = !switch_false(val);
} else if (!strcasecmp(var, "delay") && !zstr(val)) {
globals.delay = (uint32_t) atoi(val);
} else if (!strcasecmp(var, "log-b-leg")) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论