summaryrefslogtreecommitdiff
path: root/server/src/main.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2015-08-09 08:16:50 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2015-08-09 08:16:50 +0300
commit704bf55df5fae51bf0e8d86679ee7f34e22553d2 (patch)
tree68385079dec7204d8c646d4937e93d68cd4cbd42 /server/src/main.cpp
parent5a4cbe950cd653385fc6e93aa860542b01bdf1bc (diff)
client-qt:
socket wraper to work with both ssl and plain connection server: socket wraper to work with both ssl and plain connection bit of config related changes ssl support (untested)
Diffstat (limited to 'server/src/main.cpp')
-rw-r--r--server/src/main.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/server/src/main.cpp b/server/src/main.cpp
index a876b42..efbd92b 100644
--- a/server/src/main.cpp
+++ b/server/src/main.cpp
@@ -27,7 +27,7 @@
#include "utilities.h"
#include "server.h"
#include "main.h"
-
+#include "config.h"
core_api *module_api = nullptr;
@@ -76,9 +76,13 @@ int main(int argc, char *argv[])
else
std::cerr<<"failed to load config: \"" + config_path + "\", file does not exists or is not regular file\n";
}
+ //load all config variables here
+ runtime_config.settings.verbosity = runtime_config.config_file.get<short>("server.verbosity", 0);
+ daemon = runtime_config.config_file.get<bool>("server.daemon", false);
+ //override config from command line here
if(vm.count("verbosity"))
{
- runtime_config.verbosity = vm["verbosity"].as<short>();
+ runtime_config.settings.verbosity = vm["verbosity"].as<short>();
}
if(vm.count("help"))
@@ -129,7 +133,7 @@ int main(int argc, char *argv[])
modules->load_modules();
}
- std::string default_metadata_module_name = runtime_config.config_file.get<std::string>("default_metadata_module", "");
+ std::string default_metadata_module_name = runtime_config.config_file.get<std::string>("server.default_metadata_module", "");
if(default_metadata_module_name == "")
{
if(!modules->get_metadata_modules().empty())