Merge branch 'development' into LTS_development
This commit is contained in:
commit
0eca65e433
2 changed files with 3 additions and 3 deletions
|
@ -228,7 +228,7 @@ int main_loop(int argc, char ** argv){
|
||||||
if (Controller::conf.getOption("debug",true).size() > 1){
|
if (Controller::conf.getOption("debug",true).size() > 1){
|
||||||
Controller::Storage["config"]["debug"] = Controller::conf.getInteger("debug");
|
Controller::Storage["config"]["debug"] = Controller::conf.getInteger("debug");
|
||||||
}
|
}
|
||||||
if (Controller::Storage.isMember("config") && Controller::Storage["config"].isMember("debug")){
|
if (Controller::Storage.isMember("config") && Controller::Storage["config"].isMember("debug") && Controller::Storage["config"]["debug"].isInt()){
|
||||||
Util::Config::printDebugLevel = Controller::Storage["config"]["debug"].asInt();
|
Util::Config::printDebugLevel = Controller::Storage["config"]["debug"].asInt();
|
||||||
}
|
}
|
||||||
//check for port, interface and username in arguments
|
//check for port, interface and username in arguments
|
||||||
|
|
|
@ -242,8 +242,8 @@ void Controller::handleAPICommands(JSON::Value & Request, JSON::Value & Response
|
||||||
JSON::Value & out = Controller::Storage["config"];
|
JSON::Value & out = Controller::Storage["config"];
|
||||||
if (in.isMember("debug")){
|
if (in.isMember("debug")){
|
||||||
out["debug"] = in["debug"];
|
out["debug"] = in["debug"];
|
||||||
if (Util::Config::printDebugLevel != out["debug"].asInt()){
|
if (Util::Config::printDebugLevel != (out["debug"].isInt()?out["debug"].asInt():DEBUG)){
|
||||||
Util::Config::printDebugLevel = out["debug"].asInt();
|
Util::Config::printDebugLevel = (out["debug"].isInt()?out["debug"].asInt():DEBUG);
|
||||||
INFO_MSG("Debug level set to %u", Util::Config::printDebugLevel);
|
INFO_MSG("Debug level set to %u", Util::Config::printDebugLevel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue