comparison 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
comparison
equal deleted inserted replaced
2068:879f3be759ef 2069:fabf7820d1f1
104 area_(area), 104 area_(area),
105 compressionEnabled_(false), 105 compressionEnabled_(false),
106 storeMD5_(true), 106 storeMD5_(true),
107 provider_(*this), 107 provider_(*this),
108 dicomCache_(provider_, DICOM_CACHE_SIZE), 108 dicomCache_(provider_, DICOM_CACHE_SIZE),
109 scheduler_(Configuration::GetGlobalIntegerParameter("LimitJobs", 10)), 109 scheduler_(Configuration::GetGlobalUnsignedIntegerParameter("LimitJobs", 10)),
110 lua_(*this), 110 lua_(*this),
111 #if ORTHANC_PLUGINS_ENABLED == 1 111 #if ORTHANC_PLUGINS_ENABLED == 1
112 plugins_(NULL), 112 plugins_(NULL),
113 #endif 113 #endif
114 done_(false), 114 done_(false),
115 queryRetrieveArchive_(Configuration::GetGlobalIntegerParameter("QueryRetrieveSize", 10)), 115 queryRetrieveArchive_(Configuration::GetGlobalUnsignedIntegerParameter("QueryRetrieveSize", 10)),
116 defaultLocalAet_(Configuration::GetGlobalStringParameter("DicomAet", "ORTHANC")) 116 defaultLocalAet_(Configuration::GetGlobalStringParameter("DicomAet", "ORTHANC"))
117 { 117 {
118 uint64_t s = Configuration::GetGlobalIntegerParameter("DicomAssociationCloseDelay", 5); // In seconds 118 uint64_t s = Configuration::GetGlobalUnsignedIntegerParameter("DicomAssociationCloseDelay", 5); // In seconds
119 scu_.SetMillisecondsBeforeClose(s * 1000); // Milliseconds are expected here 119 scu_.SetMillisecondsBeforeClose(s * 1000); // Milliseconds are expected here
120 120
121 listeners_.push_back(ServerListener(lua_, "Lua")); 121 listeners_.push_back(ServerListener(lua_, "Lua"));
122 122
123 changeThread_ = boost::thread(ChangeThread, this); 123 changeThread_ = boost::thread(ChangeThread, this);