Mercurial > hg > orthanc
comparison Core/DicomNetworking/Internals/StoreScp.cpp @ 3705:d8b214a46b91 storage-commitment
integration mainline->storage-commitment
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 27 Feb 2020 12:07:19 +0100 |
parents | 58f92b1c8061 |
children |
comparison
equal
deleted
inserted
replaced
3703:2eeaa076c8f6 | 3705:d8b214a46b91 |
---|---|
249 */ | 249 */ |
250 OFCondition Internals::storeScp(T_ASC_Association * assoc, | 250 OFCondition Internals::storeScp(T_ASC_Association * assoc, |
251 T_DIMSE_Message * msg, | 251 T_DIMSE_Message * msg, |
252 T_ASC_PresentationContextID presID, | 252 T_ASC_PresentationContextID presID, |
253 IStoreRequestHandler& handler, | 253 IStoreRequestHandler& handler, |
254 const std::string& remoteIp) | 254 const std::string& remoteIp, |
255 int timeout) | |
255 { | 256 { |
256 OFCondition cond = EC_Normal; | 257 OFCondition cond = EC_Normal; |
257 T_DIMSE_C_StoreRQ *req; | 258 T_DIMSE_C_StoreRQ *req; |
258 | 259 |
259 // assign the actual information of the C-STORE-RQ command to a local variable | 260 // assign the actual information of the C-STORE-RQ command to a local variable |
292 // define an address where the information which will be received over the network will be stored | 293 // define an address where the information which will be received over the network will be stored |
293 DcmDataset *dset = dcmff.getDataset(); | 294 DcmDataset *dset = dcmff.getDataset(); |
294 | 295 |
295 cond = DIMSE_storeProvider(assoc, presID, req, NULL, /*opt_useMetaheader*/OFFalse, &dset, | 296 cond = DIMSE_storeProvider(assoc, presID, req, NULL, /*opt_useMetaheader*/OFFalse, &dset, |
296 storeScpCallback, &data, | 297 storeScpCallback, &data, |
297 /*opt_blockMode*/ DIMSE_BLOCKING, | 298 /*opt_blockMode*/ (timeout ? DIMSE_NONBLOCKING : DIMSE_BLOCKING), |
298 /*opt_dimse_timeout*/ 0); | 299 /*opt_dimse_timeout*/ timeout); |
299 | 300 |
300 // if some error occured, dump corresponding information and remove the outfile if necessary | 301 // if some error occured, dump corresponding information and remove the outfile if necessary |
301 if (cond.bad()) | 302 if (cond.bad()) |
302 { | 303 { |
303 OFString temp_str; | 304 OFString temp_str; |