Mercurial > hg > orthanc
diff OrthancServer/Sources/OrthancConfiguration.cpp @ 5643:b1a18218860c
2 new configurations: DicomTlsMinimumProtocolVersion + DicomTlsCiphersAccepted
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Fri, 31 May 2024 16:56:35 +0200 |
parents | f7adfb22e20e |
children | 078b724dcbf8 |
line wrap: on
line diff
--- a/OrthancServer/Sources/OrthancConfiguration.cpp Fri May 31 09:20:35 2024 +0200 +++ b/OrthancServer/Sources/OrthancConfiguration.cpp Fri May 31 16:56:35 2024 +0200 @@ -751,7 +751,7 @@ if (lst.type() != Json::arrayValue) { - throw OrthancException(ErrorCode_BadFileFormat, "Badly formatted list of strings"); + throw OrthancException(ErrorCode_BadFileFormat, "Badly formatted list of strings: " + key); } for (Json::Value::ArrayIndex i = 0; i < lst.size(); i++) @@ -760,7 +760,31 @@ } } - + + void OrthancConfiguration::GetSetOfStringsParameter(std::set<std::string>& target, + const std::string& key) const + { + target.clear(); + + if (!json_.isMember(key)) + { + return; + } + + const Json::Value& lst = json_[key]; + + if (lst.type() != Json::arrayValue) + { + throw OrthancException(ErrorCode_BadFileFormat, "Badly formatted set of strings: " + key); + } + + for (Json::Value::ArrayIndex i = 0; i < lst.size(); i++) + { + target.insert(lst[i].asString()); + } + } + + bool OrthancConfiguration::IsSameAETitle(const std::string& aet1, const std::string& aet2) const {