Mercurial > hg > orthanc
diff OrthancServer/OrthancRestApi/OrthancRestModalities.cpp @ 2580:055d7d4a823f jobs
avoid unecessary openings of DICOM connection for C-Store
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 11 May 2018 09:35:17 +0200 |
parents | 3372c5255333 |
children | 1b6a6d80b6f2 |
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestModalities.cpp Fri May 11 08:54:56 2018 +0200 +++ b/OrthancServer/OrthancRestApi/OrthancRestModalities.cpp Fri May 11 09:35:17 2018 +0200 @@ -157,14 +157,13 @@ std::auto_ptr<DicomUserConnection> connection_; std::set<std::string> failedInstances_; - void Open() + void CreateConnection() { if (connection_.get() == NULL) { connection_.reset(new DicomUserConnection); connection_->SetLocalApplicationEntityTitle(localAet_); connection_->SetRemoteModality(remote_); - connection_->Open(); } } @@ -299,7 +298,7 @@ return new JobStepResult(JobStepCode_Success); } - Open(); + CreateConnection(); bool ok = false;