mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 11:38:20 +00:00
Move the functions and variables in Net.h to the zeek::net namespace. This includes moving network_time out of util.h.
This commit is contained in:
parent
ca9baec6e8
commit
e7c6d51ae7
55 changed files with 461 additions and 374 deletions
|
@ -130,7 +130,7 @@ void Manager::SendHeartbeats()
|
|||
void Manager::StartHeartbeatTimer()
|
||||
{
|
||||
heartbeat_timer_running = true;
|
||||
zeek::detail::timer_mgr->Add(new detail::HeartbeatTimer(network_time + zeek::BifConst::Threading::heartbeat_interval));
|
||||
zeek::detail::timer_mgr->Add(new detail::HeartbeatTimer(zeek::net::network_time + zeek::BifConst::Threading::heartbeat_interval));
|
||||
}
|
||||
|
||||
// Raise everything in here as warnings so it is passed to scriptland without
|
||||
|
@ -191,10 +191,10 @@ void Manager::Flush()
|
|||
{
|
||||
bool do_beat = false;
|
||||
|
||||
if ( network_time && (network_time > next_beat || ! next_beat) )
|
||||
if ( zeek::net::network_time && (zeek::net::network_time > next_beat || ! next_beat) )
|
||||
{
|
||||
do_beat = true;
|
||||
next_beat = ::network_time + zeek::BifConst::Threading::heartbeat_interval;
|
||||
next_beat = ::zeek::net::network_time + zeek::BifConst::Threading::heartbeat_interval;
|
||||
}
|
||||
|
||||
did_process = false;
|
||||
|
@ -213,7 +213,7 @@ void Manager::Flush()
|
|||
|
||||
if ( msg->Process() )
|
||||
{
|
||||
if ( network_time )
|
||||
if ( zeek::net::network_time )
|
||||
did_process = true;
|
||||
}
|
||||
|
||||
|
@ -253,7 +253,8 @@ void Manager::Flush()
|
|||
delete t;
|
||||
}
|
||||
|
||||
// fprintf(stderr, "P %.6f %.6f do_beat=%d did_process=%d next_next=%.6f\n", network_time, zeek::detail::timer_mgr->Time(), do_beat, (int)did_process, next_beat);
|
||||
// fprintf(stderr, "P %.6f %.6f do_beat=%d did_process=%d next_next=%.6f\n", zeek::net::network_time,
|
||||
// zeek::detail::timer_mgr->Time(), do_beat, (int)did_process, next_beat);
|
||||
}
|
||||
|
||||
const threading::Manager::msg_stats_list& threading::Manager::GetMsgThreadStats()
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "MsgThread.h"
|
||||
#include "Manager.h"
|
||||
#include "iosource/Manager.h"
|
||||
#include "Net.h"
|
||||
|
||||
// Set by Zeek's main signal handler.
|
||||
extern int signal_val;
|
||||
|
@ -228,7 +229,7 @@ void MsgThread::OnSignalStop()
|
|||
|
||||
child_sent_finish = true;
|
||||
// Signal thread to terminate.
|
||||
SendIn(new detail::FinishMessage(this, network_time), true);
|
||||
SendIn(new detail::FinishMessage(this, zeek::net::network_time), true);
|
||||
}
|
||||
|
||||
void MsgThread::OnWaitForStop()
|
||||
|
@ -302,7 +303,7 @@ void MsgThread::Heartbeat()
|
|||
if ( child_sent_finish )
|
||||
return;
|
||||
|
||||
SendIn(new detail::HeartbeatMessage(this, network_time, current_time()));
|
||||
SendIn(new detail::HeartbeatMessage(this, zeek::net::network_time, current_time()));
|
||||
}
|
||||
|
||||
void MsgThread::Finished()
|
||||
|
@ -449,7 +450,7 @@ void MsgThread::Run()
|
|||
// anymore.
|
||||
if ( ! child_finished && ! Killed() )
|
||||
{
|
||||
OnFinish(network_time);
|
||||
OnFinish(zeek::net::network_time);
|
||||
Finished();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue