# HG changeset patch # User Sebastien Jodogne # Date 1531401102 -7200 # Node ID c1e351b6abec1a426bc8ced4a8c06e71accf97e2 # Parent a191bbd55a2b452ac1977256e8f1feb482b9529c fix issue #66 diff -r a191bbd55a2b -r c1e351b6abec Core/DicomNetworking/Internals/MoveScp.cpp --- a/Core/DicomNetworking/Internals/MoveScp.cpp Thu Jul 12 14:32:03 2018 +0200 +++ b/Core/DicomNetworking/Internals/MoveScp.cpp Thu Jul 12 15:11:42 2018 +0200 @@ -93,6 +93,15 @@ #include +/** + * Macro specifying whether to apply the patch suggested in issue 66: + * "Orthanc responses C-MOVE with zero Move Originator Message ID" + * https://bitbucket.org/sjodogne/orthanc/issues/66/ + **/ + +#define APPLY_FIX_ISSUE_66 1 + + namespace Orthanc { namespace @@ -112,7 +121,7 @@ }; - +#if APPLY_FIX_ISSUE_66 != 1 static uint16_t GetMessageId(const DicomMap& message) { /** @@ -145,7 +154,7 @@ return 0; } - +#endif void MoveScpCallback( @@ -172,8 +181,15 @@ try { +#if APPLY_FIX_ISSUE_66 == 1 + uint16_t messageId = request->MessageID; +#else + // The line below was the implementation for Orthanc <= 1.3.2 + uint16_t messageId = GetMessageId(input); +#endif + data.iterator_.reset(data.handler_->Handle(data.target_, input, *data.remoteIp_, *data.remoteAet_, - *data.calledAet_, GetMessageId(input))); + *data.calledAet_, messageId)); if (data.iterator_.get() == NULL) {