summaryrefslogtreecommitdiffstats
path: root/src/tailer/tailer.looper.cc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tailer/tailer.looper.cc35
1 files changed, 19 insertions, 16 deletions
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);