Mercurial > hg > orthanc
comparison OrthancServer/Internals/FindScp.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 |
---|---|
97 { | 97 { |
98 IFindRequestHandler* handler_; | 98 IFindRequestHandler* handler_; |
99 DicomMap input_; | 99 DicomMap input_; |
100 DicomFindAnswers answers_; | 100 DicomFindAnswers answers_; |
101 DcmDataset* lastRequest_; | 101 DcmDataset* lastRequest_; |
102 const std::string* callingAETitle_; | 102 const std::string* remoteIp_; |
103 const std::string* remoteAet_; | |
103 bool noCroppingOfResults_; | 104 bool noCroppingOfResults_; |
104 }; | 105 }; |
105 | 106 |
106 | 107 |
107 void FindScpCallback( | 108 void FindScpCallback( |
124 { | 125 { |
125 FromDcmtkBridge::Convert(data.input_, *requestIdentifiers); | 126 FromDcmtkBridge::Convert(data.input_, *requestIdentifiers); |
126 | 127 |
127 try | 128 try |
128 { | 129 { |
129 data.noCroppingOfResults_ = data.handler_->Handle(data.answers_, data.input_, *data.callingAETitle_); | 130 data.noCroppingOfResults_ = data.handler_->Handle(data.answers_, data.input_, |
131 *data.remoteIp_, *data.remoteAet_); | |
130 } | 132 } |
131 catch (OrthancException& e) | 133 catch (OrthancException& e) |
132 { | 134 { |
133 // Internal error! | 135 // Internal error! |
134 LOG(ERROR) << "C-FIND request handler has failed: " << e.What(); | 136 LOG(ERROR) << "C-FIND request handler has failed: " << e.What(); |
172 | 174 |
173 OFCondition Internals::findScp(T_ASC_Association * assoc, | 175 OFCondition Internals::findScp(T_ASC_Association * assoc, |
174 T_DIMSE_Message * msg, | 176 T_DIMSE_Message * msg, |
175 T_ASC_PresentationContextID presID, | 177 T_ASC_PresentationContextID presID, |
176 IFindRequestHandler& handler, | 178 IFindRequestHandler& handler, |
177 const std::string& callingAETitle) | 179 const std::string& remoteIp, |
180 const std::string& remoteAet) | |
178 { | 181 { |
179 FindScpData data; | 182 FindScpData data; |
180 data.lastRequest_ = NULL; | 183 data.lastRequest_ = NULL; |
181 data.handler_ = &handler; | 184 data.handler_ = &handler; |
182 data.callingAETitle_ = &callingAETitle; | 185 data.remoteIp_ = &remoteIp; |
186 data.remoteAet_ = &remoteAet; | |
183 data.noCroppingOfResults_ = true; | 187 data.noCroppingOfResults_ = true; |
184 | 188 |
185 OFCondition cond = DIMSE_findProvider(assoc, presID, &msg->msg.CFindRQ, | 189 OFCondition cond = DIMSE_findProvider(assoc, presID, &msg->msg.CFindRQ, |
186 FindScpCallback, &data, | 190 FindScpCallback, &data, |
187 /*opt_blockMode*/ DIMSE_BLOCKING, | 191 /*opt_blockMode*/ DIMSE_BLOCKING, |