comparison OrthancServer/QueryRetrieveHandler.cpp @ 1427:d710ea64f0fd

Custom setting of the local AET during C-Store SCU (both in Lua and in the REST API)
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 29 Jun 2015 12:42:54 +0200
parents b22ba8c5edbe
children 1b1d5470233f
comparison
equal deleted inserted replaced
1426:2cf9a12c995a 1427:d710ea64f0fd
47 47
48 void QueryRetrieveHandler::Run() 48 void QueryRetrieveHandler::Run()
49 { 49 {
50 if (!done_) 50 if (!done_)
51 { 51 {
52 ReusableDicomUserConnection::Locker locker(context_.GetReusableDicomUserConnection(), modality_); 52 ReusableDicomUserConnection::Locker locker(context_.GetReusableDicomUserConnection(), localAet_, modality_);
53 locker.GetConnection().Find(answers_, level_, query_); 53 locker.GetConnection().Find(answers_, level_, query_);
54 done_ = true; 54 done_ = true;
55 } 55 }
56 } 56 }
57 57
58 58
59 QueryRetrieveHandler::QueryRetrieveHandler(ServerContext& context) : 59 QueryRetrieveHandler::QueryRetrieveHandler(ServerContext& context) :
60 context_(context), 60 context_(context),
61 localAet_(context.GetDefaultLocalApplicationEntityTitle()),
61 done_(false), 62 done_(false),
62 level_(ResourceType_Study) 63 level_(ResourceType_Study)
63 { 64 {
64 } 65 }
65 66
115 if (i >= answers_.GetSize()) 116 if (i >= answers_.GetSize())
116 { 117 {
117 throw OrthancException(ErrorCode_ParameterOutOfRange); 118 throw OrthancException(ErrorCode_ParameterOutOfRange);
118 } 119 }
119 120
120 ReusableDicomUserConnection::Locker locker(context_.GetReusableDicomUserConnection(), modality_); 121 ReusableDicomUserConnection::Locker locker(context_.GetReusableDicomUserConnection(), localAet_, modality_);
121 locker.GetConnection().Move(target, answers_.GetAnswer(i)); 122 locker.GetConnection().Move(target, answers_.GetAnswer(i));
122 } 123 }
123 124
124 125
125 void QueryRetrieveHandler::Retrieve(const std::string& target) 126 void QueryRetrieveHandler::Retrieve(const std::string& target)