Mercurial > hg > orthanc
changeset 7158:be63ecbe0bca default tip
fixed handling of DicomModalities.LocalAet handling in /modalities/../find-worklists
| author | Alain Mazy <am@orthanc.team> |
|---|---|
| date | Thu, 24 Sep 2026 17:22:41 +0200 |
| parents | 0da07ce09f9d |
| children | |
| files | NEWS OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp |
| diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Thu Sep 24 14:57:18 2026 +0200 +++ b/NEWS Thu Sep 24 17:22:41 2026 +0200 @@ -24,6 +24,8 @@ * Now rejecting Storage Commitment Report (N-EVENT-REPORT) if they don't perfectly match the request initiated by Orthanc (N-ACTION) * Added more tolerance to invalid OW value representations +* Fixed handling of "DicomModalities.LocalAet" handling in /modalities/../find-worklists + (https://discourse.orthanc-server.org/t/find-worklist-with-localaet-from-modality-configuration/6482) * Fix use of the static runtime under Visual Studio (/MT), which broke in 1.12.10 * New CMake options: - "THIRD_PARTY_DOWNLOADS_ROOT_URL" to specify another webserver to downloads the third-parties from.
--- a/OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp Thu Sep 24 14:57:18 2026 +0200 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp Thu Sep 24 17:22:41 2026 +0200 @@ -80,11 +80,16 @@ static DicomAssociationParameters GetAssociationParameters(RestApiPostCall& call, const Json::Value& body) { - const std::string& localAet = - OrthancRestApi::GetContext(call).GetDefaultLocalApplicationEntityTitle(); const RemoteModalityParameters remote = MyGetModalityUsingSymbolicName(call.GetUriComponent("id", "")); + std::string localAet = OrthancRestApi::GetContext(call).GetDefaultLocalApplicationEntityTitle(); // from the global configuration file + if (remote.HasLocalAet()) // from the "DicomModalities" configuration + { + localAet = remote.GetLocalAet(); + } + localAet = Toolbox::GetJsonStringField(body, KEY_LOCAL_AET, localAet); // from the payload + DicomAssociationParameters params(localAet, remote); InjectAssociationTimeout(params, body);
