Mercurial > hg > orthanc
changeset 4692:e68edf92e5cc
C-MOVE SCP: added possible DIMSE status "Sub-operations Complete - One or more Failures"
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 11 Jun 2021 10:48:28 +0200 |
parents | a08ef46c95a1 |
children | 45bce660ce3a |
files | NEWS OrthancFramework/Sources/DicomFormat/DicomArray.cpp OrthancFramework/Sources/DicomNetworking/Internals/MoveScp.cpp |
diffstat | 3 files changed, 17 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Thu Jun 10 12:15:38 2021 +0200 +++ b/NEWS Fri Jun 11 10:48:28 2021 +0200 @@ -21,6 +21,7 @@ ----------- * Full support of hierarchical relationships in tags whose VR is UI during anonymization +* C-MOVE SCP: added possible DIMSE status "Sub-operations Complete - One or more Failures" * Fix issue #146 (Update Anonyization to 2019c) - was actually updated to 2021b
--- a/OrthancFramework/Sources/DicomFormat/DicomArray.cpp Thu Jun 10 12:15:38 2021 +0200 +++ b/OrthancFramework/Sources/DicomFormat/DicomArray.cpp Fri Jun 11 10:48:28 2021 +0200 @@ -23,6 +23,8 @@ #include "../PrecompiledHeaders.h" #include "DicomArray.h" +#include "../OrthancException.h" + #include <stdio.h> namespace Orthanc @@ -56,7 +58,14 @@ const DicomElement &DicomArray::GetElement(size_t i) const { - return *elements_[i]; + if (i >= elements_.size()) + { + throw OrthancException(ErrorCode_ParameterOutOfRange); + } + else + { + return *elements_[i]; + } }
--- a/OrthancFramework/Sources/DicomNetworking/Internals/MoveScp.cpp Thu Jun 10 12:15:38 2021 +0200 +++ b/OrthancFramework/Sources/DicomNetworking/Internals/MoveScp.cpp Fri Jun 11 10:48:28 2021 +0200 @@ -261,6 +261,12 @@ response->NumberOfCompletedSubOperations = responseCount; response->NumberOfFailedSubOperations = data.failureCount_; response->NumberOfWarningSubOperations = data.warningCount_; + + if (data.failureCount_ != 0) + { + // Warning "Sub-operations Complete - One or more Failures" (0xB000) + response->DimseStatus = STATUS_MOVE_Warning_SubOperationsCompleteOneOrMoreFailures; + } } }