diff OrthancServer/ServerIndex.cpp @ 2668:d26dd081df97 jobs

saving jobs engine on exit
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 08 Jun 2018 18:08:48 +0200
parents 389d050a2e66
children d33659c28c6b
line wrap: on
line diff
--- a/OrthancServer/ServerIndex.cpp	Fri Jun 08 15:48:35 2018 +0200
+++ b/OrthancServer/ServerIndex.cpp	Fri Jun 08 18:08:48 2018 +0200
@@ -2096,13 +2096,20 @@
   }
 
 
+  bool ServerIndex::LookupGlobalProperty(std::string& value,
+                                         GlobalProperty property)
+  {
+    boost::mutex::scoped_lock lock(mutex_);
+    return db_.LookupGlobalProperty(value, property);
+  }
+  
+
   std::string ServerIndex::GetGlobalProperty(GlobalProperty property,
                                              const std::string& defaultValue)
   {
-    boost::mutex::scoped_lock lock(mutex_);
-
     std::string value;
-    if (db_.LookupGlobalProperty(value, property))
+
+    if (LookupGlobalProperty(value, property))
     {
       return value;
     }