diff OrthancServer/ServerIndex.cpp @ 2943:9f6716008066

merge
author am@osimis.io
date Thu, 29 Nov 2018 15:26:47 +0100
parents 4767d36679ed
children 96089d1aba4d
line wrap: on
line diff
--- a/OrthancServer/ServerIndex.cpp	Thu Nov 29 15:26:31 2018 +0100
+++ b/OrthancServer/ServerIndex.cpp	Thu Nov 29 15:26:47 2018 +0100
@@ -40,7 +40,7 @@
 
 #include "ServerIndexChange.h"
 #include "EmbeddedResources.h"
-#include "OrthancInitialization.h"
+#include "OrthancConfiguration.h"
 #include "../Core/DicomParsing/ParsedDicomFile.h"
 #include "ServerToolbox.h"
 #include "../Core/Toolbox.h"
@@ -1931,7 +1931,13 @@
   void ServerIndex::UnstableResourcesMonitorThread(ServerIndex* that,
                                                    unsigned int threadSleep)
   {
-    int stableAge = Configuration::GetGlobalUnsignedIntegerParameter("StableAge", 60);
+    int stableAge;
+    
+    {
+      OrthancConfiguration::ReaderLock lock;
+      stableAge = lock.GetConfiguration().GetUnsignedIntegerParameter("StableAge", 60);
+    }
+
     if (stableAge <= 0)
     {
       stableAge = 60;