Mercurial > hg > orthanc
comparison OrthancServer/Internals/StoreScp.cpp @ 1285:5730f374e4e6
Access to called AET and remote AET from Lua scripts
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 03 Feb 2015 15:00:42 +0100 |
parents | a226e0959d8b |
children | 6e7e5ed91c2d |
comparison
equal
deleted
inserted
replaced
1284:21ea32170764 | 1285:5730f374e4e6 |
---|---|
100 namespace | 100 namespace |
101 { | 101 { |
102 struct StoreCallbackData | 102 struct StoreCallbackData |
103 { | 103 { |
104 IStoreRequestHandler* handler; | 104 IStoreRequestHandler* handler; |
105 const char* distantAET; | 105 const char* remoteAET; |
106 const char* calledAET; | |
106 const char* modality; | 107 const char* modality; |
107 const char* affectedSOPInstanceUID; | 108 const char* affectedSOPInstanceUID; |
108 uint32_t messageID; | 109 uint32_t messageID; |
109 }; | 110 }; |
110 | 111 |
199 } | 200 } |
200 else | 201 else |
201 { | 202 { |
202 try | 203 try |
203 { | 204 { |
204 cbdata->handler->Handle(buffer, summary, dicomJson, cbdata->distantAET); | 205 cbdata->handler->Handle(buffer, summary, dicomJson, cbdata->remoteAET, cbdata->calledAET); |
205 } | 206 } |
206 catch (OrthancException& e) | 207 catch (OrthancException& e) |
207 { | 208 { |
208 rsp->DimseStatus = STATUS_STORE_Refused_OutOfResources; | 209 rsp->DimseStatus = STATUS_STORE_Refused_OutOfResources; |
209 | 210 |
253 | 254 |
254 callbackData.affectedSOPInstanceUID = req->AffectedSOPInstanceUID; | 255 callbackData.affectedSOPInstanceUID = req->AffectedSOPInstanceUID; |
255 callbackData.messageID = req->MessageID; | 256 callbackData.messageID = req->MessageID; |
256 if (assoc && assoc->params) | 257 if (assoc && assoc->params) |
257 { | 258 { |
258 callbackData.distantAET = assoc->params->DULparams.callingAPTitle; | 259 callbackData.remoteAET = assoc->params->DULparams.callingAPTitle; |
260 callbackData.calledAET = assoc->params->DULparams.calledAPTitle; | |
259 } | 261 } |
260 else | 262 else |
261 { | 263 { |
262 callbackData.distantAET = ""; | 264 callbackData.remoteAET = ""; |
265 callbackData.calledAET = ""; | |
263 } | 266 } |
264 | 267 |
265 DcmFileFormat dcmff; | 268 DcmFileFormat dcmff; |
266 | 269 |
267 // store SourceApplicationEntityTitle in metaheader | 270 // store SourceApplicationEntityTitle in metaheader |