comparison OrthancFramework/Sources/JobsEngine/JobsRegistry.cpp @ 4805:0a38000b086d

Archive jobs response now contains a header Content-Disposition:filename='archive.zip'
author Alain Mazy <am@osimis.io>
date Tue, 09 Nov 2021 09:51:14 +0100
parents a046e91cc76f
children 7053502fbf97
comparison
equal deleted inserted replaced
4804:ae643f664628 4805:0a38000b086d
648 } 648 }
649 649
650 650
651 bool JobsRegistry::GetJobOutput(std::string& output, 651 bool JobsRegistry::GetJobOutput(std::string& output,
652 MimeType& mime, 652 MimeType& mime,
653 std::string& filename,
653 const std::string& job, 654 const std::string& job,
654 const std::string& key) 655 const std::string& key)
655 { 656 {
656 boost::mutex::scoped_lock lock(mutex_); 657 boost::mutex::scoped_lock lock(mutex_);
657 CheckInvariants(); 658 CheckInvariants();
666 { 667 {
667 const JobHandler& handler = *found->second; 668 const JobHandler& handler = *found->second;
668 669
669 if (handler.GetState() == JobState_Success) 670 if (handler.GetState() == JobState_Success)
670 { 671 {
671 return handler.GetJob().GetOutput(output, mime, key); 672 return handler.GetJob().GetOutput(output, mime, filename, key);
672 } 673 }
673 else 674 else
674 { 675 {
675 return false; 676 return false;
676 } 677 }