# HG changeset patch # User Sebastien Jodogne # Date 1623401308 -7200 # Node ID e68edf92e5ccfb3a9d8f318cdccd1e47448178d9 # Parent a08ef46c95a1a5a66584da33ce7984eba68610d9 C-MOVE SCP: added possible DIMSE status "Sub-operations Complete - One or more Failures" diff -r a08ef46c95a1 -r e68edf92e5cc NEWS --- 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 diff -r a08ef46c95a1 -r e68edf92e5cc OrthancFramework/Sources/DicomFormat/DicomArray.cpp --- 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 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]; + } } diff -r a08ef46c95a1 -r e68edf92e5cc OrthancFramework/Sources/DicomNetworking/Internals/MoveScp.cpp --- 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; + } } }