diff options
Diffstat (limited to 'server/server/config.cpp')
-rwxr-xr-x | server/server/config.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/server/server/config.cpp b/server/server/config.cpp index 890c369..6d945d3 100755 --- a/server/server/config.cpp +++ b/server/server/config.cpp @@ -31,7 +31,7 @@ void speed_test_thread_func(config *cfg, int check_interval, std::list<config::p { speedtest t(test_url); int sp = (int)t.test(&(*i)); - if(cfg->debug()) + if(cfg->log_speed()) { char port[10]; snprintf(port, 9, "%d", i->port); @@ -71,6 +71,7 @@ void config::load_vars() vars.conn_time = get_int(cfg_str, "ConnectionTimeOut=", 60); vars.dos_conn_count = get_int(cfg_str, "DosConnectionCount=", 100); vars.debug = get_int(cfg_str, "Debug=", 0); + vars.log_speed = get_int(cfg_str, "LogSpeed=", 0); vars.bind_ip = get_string(cfg_str, "BindAddress=", "0.0.0.0"); vars.log_path = get_string(cfg_str, "LogPath=", ""); vars.dos_log_path = get_string(cfg_str, "DosLogPath=", ""); @@ -568,6 +569,11 @@ bool config::ignore_ssl_errors() return vars.ignore_ssl_errors; } +bool config::log_speed() +{ + return vars.log_speed; +} + std::list<std::string>* config::cli_cfg() { return &cvars; |