From bb380613f4fd763601485fdb32826f6339ed833a Mon Sep 17 00:00:00 2001 From: Thulinma Date: Tue, 23 Apr 2013 12:41:25 +0200 Subject: [PATCH] Tweaked log messages in controller when messing with immutable properties (time, version). --- src/controller/controller.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/controller/controller.cpp b/src/controller/controller.cpp index f1576ac4..39b6faab 100644 --- a/src/controller/controller.cpp +++ b/src/controller/controller.cpp @@ -90,21 +90,22 @@ namespace Controller { ///\param out The location to store the resulting configuration. void CheckConfig(JSON::Value & in, JSON::Value & out){ for (JSON::ObjIter jit = in.ObjBegin(); jit != in.ObjEnd(); jit++){ - if (jit->first == "version"){ + if (jit->first == "version" || jit->first == "time"){ continue; } if (out.isMember(jit->first)){ if (jit->second != out[jit->first]){ - if (jit->first != "time"){ - Log("CONF", std::string("Updated configuration value ") + jit->first); - } + Log("CONF", std::string("Updated configuration value ") + jit->first); } }else{ Log("CONF", std::string("New configuration value ") + jit->first); } } for (JSON::ObjIter jit = out.ObjBegin(); jit != out.ObjEnd(); jit++){ - if ( !in.isMember(jit->first) || jit->first == "version"){ + if (jit->first == "version" || jit->first == "time"){ + continue; + } + if ( !in.isMember(jit->first)){ Log("CONF", std::string("Deleted configuration value ") + jit->first); } }