From 7c1c779cfd01162d020d0c276bb605adfe338df9 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Wed, 5 Oct 2022 16:09:31 +0200 Subject: Add load_entire_file option for file inputs --- src/ConfigParser.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/ConfigParser.cpp') diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp index dbbc2fb..a845bef 100644 --- a/src/ConfigParser.cpp +++ b/src/ConfigParser.cpp @@ -1090,16 +1090,24 @@ static void setup_subchannel_from_ptree(shared_ptr& subchan, throw runtime_error(ss.str()); } - const bool nonblock = pt.get("nonblock", false); - if (nonblock) { + if (pt.get("nonblock", false)) { if (auto filein = dynamic_pointer_cast(subchan->input)) { - filein->setNonblocking(nonblock); + filein->setNonblocking(true); } else { etiLog.level(warn) << "The nonblock option is not supported"; } } + if (pt.get("load_entire_file", false)) { + if (auto filein = dynamic_pointer_cast(subchan->input)) { + filein->setLoadEntireFile(true); + } + else { + etiLog.level(warn) << "The load_entire_file option is not supported"; + } + } + const string bufferManagement = pt.get("buffer-management", "prebuffering"); if (bufferManagement == "prebuffering") { subchan->input->setBufferManagement(Inputs::BufferManagement::Prebuffering); -- cgit v1.2.3