Mercurial > hg > orthanc
comparison Core/DicomNetworking/Internals/FindScp.cpp @ 3786:3801435e34a1 SylvainRouquette/fix-issue169-95b752c
integration Orthanc-1.6.0->SylvainRouquette
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 19 Mar 2020 11:48:30 +0100 |
parents | 58f92b1c8061 |
children |
comparison
equal
deleted
inserted
replaced
3785:763533d6dd67 | 3786:3801435e34a1 |
---|---|
1 /** | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | 2 * Orthanc - A Lightweight, RESTful DICOM Store |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
4 * Department, University Hospital of Liege, Belgium | 4 * Department, University Hospital of Liege, Belgium |
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium | 5 * Copyright (C) 2017-2020 Osimis S.A., Belgium |
6 * | 6 * |
7 * This program is free software: you can redistribute it and/or | 7 * This program is free software: you can redistribute it and/or |
8 * modify it under the terms of the GNU General Public License as | 8 * modify it under the terms of the GNU General Public License as |
9 * published by the Free Software Foundation, either version 3 of the | 9 * published by the Free Software Foundation, either version 3 of the |
10 * License, or (at your option) any later version. | 10 * License, or (at your option) any later version. |
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; |