Mercurial > hg > orthanc
comparison Core/DicomNetworking/Internals/FindScp.cpp @ 3704:58f92b1c8061
Fix issue #167 (Job can't be cancelled - Handling of timeouts after established association)
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 27 Feb 2020 11:25:57 +0100 |
parents | 94f4a18a79cc |
children |
comparison
equal
deleted
inserted
replaced
3702:643b5ee86f92 | 3704:58f92b1c8061 |
---|---|
344 DicomServer::IRemoteModalities& modalities, | 344 DicomServer::IRemoteModalities& modalities, |
345 IFindRequestHandler* findHandler, | 345 IFindRequestHandler* findHandler, |
346 IWorklistRequestHandler* worklistHandler, | 346 IWorklistRequestHandler* worklistHandler, |
347 const std::string& remoteIp, | 347 const std::string& remoteIp, |
348 const std::string& remoteAet, | 348 const std::string& remoteAet, |
349 const std::string& calledAet) | 349 const std::string& calledAet, |
350 int timeout) | |
350 { | 351 { |
351 FindScpData data; | 352 FindScpData data; |
352 data.modalities_ = &modalities; | 353 data.modalities_ = &modalities; |
353 data.findHandler_ = findHandler; | 354 data.findHandler_ = findHandler; |
354 data.worklistHandler_ = worklistHandler; | 355 data.worklistHandler_ = worklistHandler; |
357 data.remoteAet_ = &remoteAet; | 358 data.remoteAet_ = &remoteAet; |
358 data.calledAet_ = &calledAet; | 359 data.calledAet_ = &calledAet; |
359 | 360 |
360 OFCondition cond = DIMSE_findProvider(assoc, presID, &msg->msg.CFindRQ, | 361 OFCondition cond = DIMSE_findProvider(assoc, presID, &msg->msg.CFindRQ, |
361 FindScpCallback, &data, | 362 FindScpCallback, &data, |
362 /*opt_blockMode*/ DIMSE_BLOCKING, | 363 /*opt_blockMode*/ (timeout ? DIMSE_NONBLOCKING : DIMSE_BLOCKING), |
363 /*opt_dimse_timeout*/ 0); | 364 /*opt_dimse_timeout*/ timeout); |
364 | 365 |
365 // if some error occured, dump corresponding information and remove the outfile if necessary | 366 // if some error occured, dump corresponding information and remove the outfile if necessary |
366 if (cond.bad()) | 367 if (cond.bad()) |
367 { | 368 { |
368 OFString temp_str; | 369 OFString temp_str; |