Mercurial > hg > orthanc
comparison OrthancServer/Internals/MoveScp.cpp @ 1573:3309878b3e16
more information about the origin of requests submitted to the DICOM handlers
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 25 Aug 2015 13:05:22 +0200 |
parents | f967bdf8534e |
children | 164d78911382 |
comparison
equal
deleted
inserted
replaced
1572:904096e7367e | 1573:3309878b3e16 |
---|---|
102 DcmDataset* lastRequest_; | 102 DcmDataset* lastRequest_; |
103 unsigned int subOperationCount_; | 103 unsigned int subOperationCount_; |
104 unsigned int failureCount_; | 104 unsigned int failureCount_; |
105 unsigned int warningCount_; | 105 unsigned int warningCount_; |
106 std::auto_ptr<IMoveRequestIterator> iterator_; | 106 std::auto_ptr<IMoveRequestIterator> iterator_; |
107 const std::string* remoteIp_; | |
108 const std::string* remoteAet_; | |
107 }; | 109 }; |
108 | 110 |
109 | 111 |
110 void MoveScpCallback( | 112 void MoveScpCallback( |
111 /* in */ | 113 /* in */ |
128 { | 130 { |
129 FromDcmtkBridge::Convert(data.input_, *requestIdentifiers); | 131 FromDcmtkBridge::Convert(data.input_, *requestIdentifiers); |
130 | 132 |
131 try | 133 try |
132 { | 134 { |
133 data.iterator_.reset(data.handler_->Handle(data.target_, data.input_)); | 135 data.iterator_.reset(data.handler_->Handle(data.target_, data.input_, |
136 *data.remoteIp_, *data.remoteAet_)); | |
134 | 137 |
135 if (data.iterator_.get() == NULL) | 138 if (data.iterator_.get() == NULL) |
136 { | 139 { |
137 // Internal error! | 140 // Internal error! |
138 response->DimseStatus = STATUS_MOVE_Failed_UnableToProcess; | 141 response->DimseStatus = STATUS_MOVE_Failed_UnableToProcess; |
208 | 211 |
209 | 212 |
210 OFCondition Internals::moveScp(T_ASC_Association * assoc, | 213 OFCondition Internals::moveScp(T_ASC_Association * assoc, |
211 T_DIMSE_Message * msg, | 214 T_DIMSE_Message * msg, |
212 T_ASC_PresentationContextID presID, | 215 T_ASC_PresentationContextID presID, |
213 IMoveRequestHandler& handler) | 216 IMoveRequestHandler& handler, |
217 const std::string& remoteIp, | |
218 const std::string& remoteAet) | |
214 { | 219 { |
215 MoveScpData data; | 220 MoveScpData data; |
216 data.target_ = std::string(msg->msg.CMoveRQ.MoveDestination); | 221 data.target_ = std::string(msg->msg.CMoveRQ.MoveDestination); |
217 data.lastRequest_ = NULL; | 222 data.lastRequest_ = NULL; |
218 data.handler_ = &handler; | 223 data.handler_ = &handler; |
224 data.remoteIp_ = &remoteIp; | |
225 data.remoteAet_ = &remoteAet; | |
219 | 226 |
220 OFCondition cond = DIMSE_moveProvider(assoc, presID, &msg->msg.CMoveRQ, | 227 OFCondition cond = DIMSE_moveProvider(assoc, presID, &msg->msg.CMoveRQ, |
221 MoveScpCallback, &data, | 228 MoveScpCallback, &data, |
222 /*opt_blockMode*/ DIMSE_BLOCKING, | 229 /*opt_blockMode*/ DIMSE_BLOCKING, |
223 /*opt_dimse_timeout*/ 0); | 230 /*opt_dimse_timeout*/ 0); |