mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Remove finish_run()
This commit is contained in:
parent
124f2a7d28
commit
7e2f33c9ee
3 changed files with 5 additions and 29 deletions
|
@ -106,7 +106,7 @@ RETSIGTYPE watchdog(int /* signo */) {
|
|||
}
|
||||
|
||||
get_final_stats();
|
||||
finish_run(0);
|
||||
util::detail::set_processing_status("TERMINATING", "watchdog");
|
||||
|
||||
reporter->FatalErrorWithCore("**watchdog timer expired, t = %d.%06d, start = %d.%06d, dispatched = %d",
|
||||
int_ct, frac_ct, int_pst, frac_pst, current_dispatched);
|
||||
|
@ -340,9 +340,7 @@ void run_loop() {
|
|||
}
|
||||
}
|
||||
|
||||
// Get the final statistics now, and not when finish_run() is
|
||||
// called, since that might happen quite a bit in the future
|
||||
// due to expiring pending timers, and we don't want to ding
|
||||
// Get the final statistics now, as we don't want to ding
|
||||
// for any packets dropped beyond this point.
|
||||
get_final_stats();
|
||||
}
|
||||
|
@ -375,29 +373,6 @@ void get_final_stats() {
|
|||
}
|
||||
}
|
||||
|
||||
void finish_run(int drain_events) {
|
||||
util::detail::set_processing_status("TERMINATING", "finish_run");
|
||||
|
||||
if ( drain_events ) {
|
||||
if ( session_mgr )
|
||||
session_mgr->Drain();
|
||||
|
||||
event_mgr.Drain();
|
||||
|
||||
if ( session_mgr )
|
||||
session_mgr->Clear();
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
extern int reassem_seen_bytes, reassem_copied_bytes;
|
||||
// DEBUG_MSG("Reassembly (TCP and IP/Frag): %d bytes seen, %d bytes copied\n",
|
||||
// reassem_seen_bytes, reassem_copied_bytes);
|
||||
|
||||
extern int num_packets_held, num_packets_cleaned;
|
||||
// DEBUG_MSG("packets clean up: %d/%d\n", num_packets_cleaned, num_packets_held);
|
||||
#endif
|
||||
}
|
||||
|
||||
void delete_run() {
|
||||
util::detail::set_processing_status("TERMINATING", "delete_run");
|
||||
|
||||
|
|
|
@ -26,7 +26,6 @@ extern void init_run(const std::optional<std::string>& interfaces, const std::op
|
|||
const std::optional<std::string>& pcap_output_file, bool do_watchdog);
|
||||
extern void run_loop();
|
||||
extern void get_final_stats();
|
||||
extern void finish_run(int drain_events);
|
||||
extern void delete_run(); // Reclaim all memory, etc.
|
||||
extern void update_network_time(double new_network_time);
|
||||
extern void dispatch_packet(zeek::Packet* pkt, zeek::iosource::PktSrc* pkt_src);
|
||||
|
|
|
@ -322,7 +322,9 @@ static void done_with_network() {
|
|||
event_mgr.Drain();
|
||||
event_mgr.Drain();
|
||||
|
||||
run_state::detail::finish_run(1);
|
||||
session_mgr->Drain();
|
||||
event_mgr.Drain();
|
||||
session_mgr->Clear();
|
||||
|
||||
#ifdef USE_PERFTOOLS_DEBUG
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue