summaryrefslogtreecommitdiffstats
path: root/src/tailer
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tailer/Makefile.am3
-rwxr-xr-xsrc/tailer/tailer.apebin147456 -> 147456 bytes
-rw-r--r--src/tailer/tailer.looper.cc35
3 files changed, 22 insertions, 16 deletions
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
--- a/src/tailer/tailer.ape
+++ b/src/tailer/tailer.ape
Binary files 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<unsigned char> buffer;
-
- buffer = (unsigned char*) malloc(BUFFER_SIZE);
+ auto buffer = auto_mem<unsigned char>::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<main_looper&, services::main_t>().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);