提交 f339330d authored 作者: Brian West's avatar Brian West

XML-26

上级 43841079
......@@ -67,6 +67,7 @@ static struct {
int disable100continue;
int rotate;
int auth_scheme;
int timeout;
switch_memory_pool_t *pool;
} globals;
......@@ -327,8 +328,9 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
curl_easy_setopt(curl_handle, CURLOPT_CAINFO, globals.ssl_cacert_file);
}
curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT, globals.timeout);
/* these were used for testing, optionally they may be enabled if someone desires
curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT, 120); // tcp timeout
curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1); // 302 recursion level
*/
......@@ -499,6 +501,14 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_xml_cdr_load)
}
} else if (!strcasecmp(var, "log-http-and-disk")) {
globals.log_http_and_disk = switch_true(val);
} else if (!strcasecmp(var, "timeout")) {
int tmp = atoi(val);
if (tmp >= 0) {
globals.timeout = tmp;
} else {
globals.timeout = 0;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't set a negative timeout!\n");
}
} else if (!strcasecmp(var, "delay") && !zstr(val)) {
globals.delay = (uint32_t) atoi(val);
} else if (!strcasecmp(var, "log-b-leg")) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论