From 207df6fc406e81bfeebdff7f404bd242ff3f099f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 7 May 2024 06:48:35 +0200 Subject: Merging upstream version 0.12.2. Signed-off-by: Daniel Baumann --- src/tailer/Makefile.am | 3 +++ src/tailer/tailer.ape | Bin 147456 -> 147456 bytes src/tailer/tailer.looper.cc | 35 +++++++++++++++++++---------------- 3 files changed, 22 insertions(+), 16 deletions(-) (limited to 'src/tailer') diff --git a/src/tailer/Makefile.am b/src/tailer/Makefile.am index bb8a39a..91aabf7 100644 --- a/src/tailer/Makefile.am +++ b/src/tailer/Makefile.am @@ -43,6 +43,7 @@ libtailerpp_a_CPPFLAGS = \ -I$(srcdir)/.. \ -I$(srcdir)/../fmtlib \ -I$(srcdir)/../third-party \ + -I$(top_srcdir)/src/third-party/date/include \ -I$(top_srcdir)/src/third-party/scnlib/include libtailerpp_a_SOURCES = \ @@ -56,6 +57,7 @@ libtailerservice_a_CPPFLAGS = \ -I$(srcdir)/.. \ -I$(srcdir)/../fmtlib \ -I$(srcdir)/../third-party \ + -I$(top_srcdir)/src/third-party/date/include \ -I$(top_srcdir)/src/third-party/scnlib/include libtailerservice_a_SOURCES = \ @@ -74,6 +76,7 @@ tailer_LDADD = libtailercommon.a drive_tailer_CPPFLAGS = \ -I$(srcdir)/.. \ -I$(srcdir)/../fmtlib \ + -I$(top_srcdir)/src/third-party/date/include \ -I$(top_srcdir)/src/third-party/scnlib/include drive_tailer_SOURCES = \ diff --git a/src/tailer/tailer.ape b/src/tailer/tailer.ape index 69ebc11..e279c26 100755 Binary files a/src/tailer/tailer.ape and b/src/tailer/tailer.ape differ diff --git a/src/tailer/tailer.looper.cc b/src/tailer/tailer.looper.cc index 82a9fdc..9986653 100644 --- a/src/tailer/tailer.looper.cc +++ b/src/tailer/tailer.looper.cc @@ -132,7 +132,7 @@ update_tailer_description( iter->second.ofd_description = remote_uname; } - fc.fc_name_to_errors.erase(netloc); + fc.fc_name_to_errors->writeAccess()->erase(netloc); }); } @@ -225,10 +225,11 @@ tailer::looper::load_preview(int64_t id, const network::path& path) if (lnav_data.ld_preview_generation != id) { return; } - lnav_data.ld_preview_status_source.get_description() + lnav_data.ld_preview_status_source[0] + .get_description() .set_cylon(false) .clear(); - lnav_data.ld_preview_source.clear(); + lnav_data.ld_preview_source[0].clear(); lnav_data.ld_bottom_source.grep_error(msg); }); return; @@ -539,7 +540,8 @@ tailer::looper::host_tailer::load_preview(int64_t id, const std::string& path) if (lnav_data.ld_preview_generation != id) { return; } - lnav_data.ld_preview_status_source.get_description() + lnav_data.ld_preview_status_source[0] + .get_description() .set_cylon(false) .set_value(msg); }); @@ -787,9 +789,7 @@ tailer::looper::host_tailer::loop_body() } constexpr int64_t BUFFER_SIZE = 4 * 1024 * 1024; - auto_mem buffer; - - buffer = (unsigned char*) malloc(BUFFER_SIZE); + auto buffer = auto_mem::malloc(BUFFER_SIZE); auto remaining = pob.pob_length; auto remaining_offset = pob.pob_offset; tailer::hash_frag thf; @@ -997,10 +997,11 @@ tailer::looper::host_tailer::loop_body() ppe.ppe_id); return; } - lnav_data.ld_preview_status_source.get_description() + lnav_data.ld_preview_status_source[0] + .get_description() .set_cylon(false) .clear(); - lnav_data.ld_preview_source.clear(); + lnav_data.ld_preview_source[0].clear(); lnav_data.ld_bottom_source.grep_error(ppe.ppe_msg); }); @@ -1017,12 +1018,14 @@ tailer::looper::host_tailer::loop_body() } std::string str(ppd.ppd_bits.begin(), ppd.ppd_bits.end()); - lnav_data.ld_preview_status_source.get_description() + lnav_data.ld_preview_status_source[0] + .get_description() .set_cylon(false) .set_value("For file: %s:%s", netloc.c_str(), ppd.ppd_path.c_str()); - lnav_data.ld_preview_source.replace_with(str) + lnav_data.ld_preview_source[0] + .replace_with(str) .set_text_format(detect_text_format(str)); }); return std::move(this->ht_state); @@ -1151,11 +1154,11 @@ tailer::looper::report_error(std::string path, std::string msg) isc::to().send([=](auto& mlooper) { file_collection fc; - fc.fc_name_to_errors.emplace(path, - file_error_info{ - {}, - msg, - }); + fc.fc_name_to_errors->writeAccess()->emplace(path, + file_error_info{ + {}, + msg, + }); update_active_files(fc); lnav_data.ld_active_files.fc_progress->writeAccess()->sp_tailers.erase( path); -- cgit v1.2.3