diff OrthancServer/ServerContext.cpp @ 2069:fabf7820d1f1

New configuration options: "DicomScuTimeout" and "DicomScpTimeout" + validation of non-negative options
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 13 Jul 2016 16:52:39 +0200
parents b1291df2f780
children 4b02ec79728a
line wrap: on
line diff
--- a/OrthancServer/ServerContext.cpp	Wed Jul 13 16:10:25 2016 +0200
+++ b/OrthancServer/ServerContext.cpp	Wed Jul 13 16:52:39 2016 +0200
@@ -106,16 +106,16 @@
     storeMD5_(true),
     provider_(*this),
     dicomCache_(provider_, DICOM_CACHE_SIZE),
-    scheduler_(Configuration::GetGlobalIntegerParameter("LimitJobs", 10)),
+    scheduler_(Configuration::GetGlobalUnsignedIntegerParameter("LimitJobs", 10)),
     lua_(*this),
 #if ORTHANC_PLUGINS_ENABLED == 1
     plugins_(NULL),
 #endif
     done_(false),
-    queryRetrieveArchive_(Configuration::GetGlobalIntegerParameter("QueryRetrieveSize", 10)),
+    queryRetrieveArchive_(Configuration::GetGlobalUnsignedIntegerParameter("QueryRetrieveSize", 10)),
     defaultLocalAet_(Configuration::GetGlobalStringParameter("DicomAet", "ORTHANC"))
   {
-    uint64_t s = Configuration::GetGlobalIntegerParameter("DicomAssociationCloseDelay", 5);  // In seconds
+    uint64_t s = Configuration::GetGlobalUnsignedIntegerParameter("DicomAssociationCloseDelay", 5);  // In seconds
     scu_.SetMillisecondsBeforeClose(s * 1000);  // Milliseconds are expected here
 
     listeners_.push_back(ServerListener(lua_, "Lua"));