Mercurial > hg > orthanc
comparison OrthancServer/ServerJobs/Operations/SystemCallOperation.cpp @ 3181:6fd38327e777
Fix issue #130 (Orthanc failed to start when /tmp partition was full)
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 31 Jan 2019 15:33:27 +0100 |
parents | beeeb6096f27 |
children | 94f4a18a79cc |
comparison
equal
deleted
inserted
replaced
3180:07a2f637b76d | 3181:6fd38327e777 |
---|---|
41 #include "../../../Core/OrthancException.h" | 41 #include "../../../Core/OrthancException.h" |
42 #include "../../../Core/SerializationToolbox.h" | 42 #include "../../../Core/SerializationToolbox.h" |
43 #include "../../../Core/TemporaryFile.h" | 43 #include "../../../Core/TemporaryFile.h" |
44 #include "../../../Core/Toolbox.h" | 44 #include "../../../Core/Toolbox.h" |
45 #include "../../../Core/SystemToolbox.h" | 45 #include "../../../Core/SystemToolbox.h" |
46 #include "../../OrthancConfiguration.h" | |
46 | 47 |
47 namespace Orthanc | 48 namespace Orthanc |
48 { | 49 { |
49 const std::string& SystemCallOperation::GetPreArgument(size_t i) const | 50 const std::string& SystemCallOperation::GetPreArgument(size_t i) const |
50 { | 51 { |
90 dynamic_cast<const DicomInstanceOperationValue&>(input); | 91 dynamic_cast<const DicomInstanceOperationValue&>(input); |
91 | 92 |
92 std::string dicom; | 93 std::string dicom; |
93 instance.ReadDicom(dicom); | 94 instance.ReadDicom(dicom); |
94 | 95 |
95 tmp.reset(new TemporaryFile); | 96 { |
97 OrthancConfiguration::ReaderLock lock; | |
98 tmp.reset(lock.GetConfiguration().CreateTemporaryFile()); | |
99 } | |
100 | |
96 tmp->Write(dicom); | 101 tmp->Write(dicom); |
97 | 102 |
98 arguments.push_back(tmp->GetPath()); | 103 arguments.push_back(tmp->GetPath()); |
99 break; | 104 break; |
100 } | 105 } |