diff OrthancServer/ServerIndex.cpp @ 1239:92c6b3b57699

cleaning
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 05 Dec 2014 16:22:18 +0100
parents 6c07108ff1e2
children 62c35e4b67db
line wrap: on
line diff
--- a/OrthancServer/ServerIndex.cpp	Fri Dec 05 16:14:57 2014 +0100
+++ b/OrthancServer/ServerIndex.cpp	Fri Dec 05 16:22:18 2014 +0100
@@ -345,9 +345,10 @@
     try
     {
       boost::mutex::scoped_lock lock(that->mutex_);
-      std::string sleepString = that->db_->GetGlobalProperty(GlobalProperty_FlushSleep, "");
+      std::string sleepString;
 
-      if (Toolbox::IsInteger(sleepString))
+      if (that->db_->LookupGlobalProperty(sleepString, GlobalProperty_FlushSleep) &&
+          Toolbox::IsInteger(sleepString))
       {
         sleep = boost::lexical_cast<unsigned int>(sleepString);
       }
@@ -1917,7 +1918,16 @@
                                              const std::string& defaultValue)
   {
     boost::mutex::scoped_lock lock(mutex_);
-    return db_->GetGlobalProperty(property, defaultValue);
+
+    std::string value;
+    if (db_->LookupGlobalProperty(value, property))
+    {
+      return value;
+    }
+    else
+    {
+      return defaultValue;
+    }
   }
 
 }