Mercurial > hg > orthanc
changeset 2723:c1e351b6abec jobs
fix issue #66
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 12 Jul 2018 15:11:42 +0200 |
parents | a191bbd55a2b |
children | c8d369400ae1 |
files | Core/DicomNetworking/Internals/MoveScp.cpp |
diffstat | 1 files changed, 19 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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 <boost/lexical_cast.hpp> +/** + * 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) {