comparison OrthancServer/Scheduler/StoreScuCommand.cpp @ 1907:5011a597b6ce

Support of Move Originator Message ID (0000,1031) in C-Store responses driven by C-Move
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 07 Jan 2016 11:28:19 +0100
parents b1291df2f780
children f9f2aa1cc594
comparison
equal deleted inserted replaced
1906:d7c1cb559431 1907:5011a597b6ce
38 namespace Orthanc 38 namespace Orthanc
39 { 39 {
40 StoreScuCommand::StoreScuCommand(ServerContext& context, 40 StoreScuCommand::StoreScuCommand(ServerContext& context,
41 const std::string& localAet, 41 const std::string& localAet,
42 const RemoteModalityParameters& modality, 42 const RemoteModalityParameters& modality,
43 bool ignoreExceptions) : 43 bool ignoreExceptions,
44 uint16_t moveMessageID) :
44 context_(context), 45 context_(context),
45 modality_(modality), 46 modality_(modality),
46 ignoreExceptions_(ignoreExceptions), 47 ignoreExceptions_(ignoreExceptions),
47 localAet_(localAet) 48 localAet_(localAet),
49 moveMessageID_(moveMessageID)
48 { 50 {
49 } 51 }
50 52
51 bool StoreScuCommand::Apply(ListOfStrings& outputs, 53 bool StoreScuCommand::Apply(ListOfStrings& outputs,
52 const ListOfStrings& inputs) 54 const ListOfStrings& inputs)
61 63
62 try 64 try
63 { 65 {
64 std::string dicom; 66 std::string dicom;
65 context_.ReadFile(dicom, *it, FileContentType_Dicom); 67 context_.ReadFile(dicom, *it, FileContentType_Dicom);
66 locker.GetConnection().Store(dicom); 68
69 locker.GetConnection().Store(dicom, moveMessageID_);
67 70
68 // Only chain with other commands if this command succeeds 71 // Only chain with other commands if this command succeeds
69 outputs.push_back(*it); 72 outputs.push_back(*it);
70 } 73 }
71 catch (OrthancException& e) 74 catch (OrthancException& e)