Mercurial > hg > orthanc
diff Core/DicomNetworking/Internals/GetScp.cpp @ 3955:66879215cbf3 c-get
C-GET: add timeout, fix uninitalized priority, support multiple resources
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 20 May 2020 16:38:33 +0200 |
parents | 67b457283499 |
children | 76a24be12912 |
line wrap: on
line diff
--- a/Core/DicomNetworking/Internals/GetScp.cpp Wed May 20 09:52:20 2020 +0200 +++ b/Core/DicomNetworking/Internals/GetScp.cpp Wed May 20 16:38:33 2020 +0200 @@ -109,6 +109,7 @@ std::string remoteIp_; std::string remoteAet_; std::string calledAet_; + int timeout_; GetScpData() { @@ -162,8 +163,8 @@ try { - if(!data.handler_->Handle(input, data.remoteIp_, data.remoteAet_, - data.calledAet_)) + if (!data.handler_->Handle(input, data.remoteIp_, data.remoteAet_, data.calledAet_, + data.timeout_ < 0 ? 0 : static_cast<uint32_t>(data.timeout_))) { response->DimseStatus = STATUS_GET_Failed_UnableToProcess; return; @@ -268,6 +269,7 @@ data.remoteIp_ = remoteIp; data.remoteAet_ = remoteAet; data.calledAet_ = calledAet; + data.timeout_ = timeout; OFCondition cond = DIMSE_getProvider(assoc, presID, &msg->msg.CGetRQ, GetScpCallback, &data,