Mercurial > hg > orthanc
comparison OrthancServer/Internals/MoveScp.cpp @ 1799:4f01c9d73f02 worklists
calledAet made available to all the handlers
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 20 Nov 2015 12:57:14 +0100 |
parents | 164d78911382 |
children | b1291df2f780 |
comparison
equal
deleted
inserted
replaced
1798:e92cd8841a5f | 1799:4f01c9d73f02 |
---|---|
103 unsigned int failureCount_; | 103 unsigned int failureCount_; |
104 unsigned int warningCount_; | 104 unsigned int warningCount_; |
105 std::auto_ptr<IMoveRequestIterator> iterator_; | 105 std::auto_ptr<IMoveRequestIterator> iterator_; |
106 const std::string* remoteIp_; | 106 const std::string* remoteIp_; |
107 const std::string* remoteAet_; | 107 const std::string* remoteAet_; |
108 const std::string* calledAet_; | |
108 }; | 109 }; |
109 | 110 |
110 | 111 |
111 void MoveScpCallback( | 112 void MoveScpCallback( |
112 /* in */ | 113 /* in */ |
131 FromDcmtkBridge::Convert(input, *requestIdentifiers); | 132 FromDcmtkBridge::Convert(input, *requestIdentifiers); |
132 | 133 |
133 try | 134 try |
134 { | 135 { |
135 data.iterator_.reset(data.handler_->Handle(data.target_, input, | 136 data.iterator_.reset(data.handler_->Handle(data.target_, input, |
136 *data.remoteIp_, *data.remoteAet_)); | 137 *data.remoteIp_, *data.remoteAet_, |
138 *data.calledAet_)); | |
137 | 139 |
138 if (data.iterator_.get() == NULL) | 140 if (data.iterator_.get() == NULL) |
139 { | 141 { |
140 // Internal error! | 142 // Internal error! |
141 response->DimseStatus = STATUS_MOVE_Failed_UnableToProcess; | 143 response->DimseStatus = STATUS_MOVE_Failed_UnableToProcess; |
213 OFCondition Internals::moveScp(T_ASC_Association * assoc, | 215 OFCondition Internals::moveScp(T_ASC_Association * assoc, |
214 T_DIMSE_Message * msg, | 216 T_DIMSE_Message * msg, |
215 T_ASC_PresentationContextID presID, | 217 T_ASC_PresentationContextID presID, |
216 IMoveRequestHandler& handler, | 218 IMoveRequestHandler& handler, |
217 const std::string& remoteIp, | 219 const std::string& remoteIp, |
218 const std::string& remoteAet) | 220 const std::string& remoteAet, |
221 const std::string& calledAet) | |
219 { | 222 { |
220 MoveScpData data; | 223 MoveScpData data; |
221 data.target_ = std::string(msg->msg.CMoveRQ.MoveDestination); | 224 data.target_ = std::string(msg->msg.CMoveRQ.MoveDestination); |
222 data.lastRequest_ = NULL; | 225 data.lastRequest_ = NULL; |
223 data.handler_ = &handler; | 226 data.handler_ = &handler; |
224 data.remoteIp_ = &remoteIp; | 227 data.remoteIp_ = &remoteIp; |
225 data.remoteAet_ = &remoteAet; | 228 data.remoteAet_ = &remoteAet; |
229 data.calledAet_ = &calledAet; | |
226 | 230 |
227 OFCondition cond = DIMSE_moveProvider(assoc, presID, &msg->msg.CMoveRQ, | 231 OFCondition cond = DIMSE_moveProvider(assoc, presID, &msg->msg.CMoveRQ, |
228 MoveScpCallback, &data, | 232 MoveScpCallback, &data, |
229 /*opt_blockMode*/ DIMSE_BLOCKING, | 233 /*opt_blockMode*/ DIMSE_BLOCKING, |
230 /*opt_dimse_timeout*/ 0); | 234 /*opt_dimse_timeout*/ 0); |