mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +00:00
Move zeek::net namespace to zeek::run_state namespace.
This also moves all of the code from Net.{h,cc} to RunState.{h,cc} and marks Net.h as deprecated
This commit is contained in:
parent
d608e7c9a5
commit
0ac3fafe13
64 changed files with 477 additions and 467 deletions
|
@ -7,6 +7,7 @@
|
|||
#include "iosource/Manager.h"
|
||||
#include "Event.h"
|
||||
#include "IPAddr.h"
|
||||
#include "RunState.h"
|
||||
|
||||
namespace zeek::threading {
|
||||
namespace detail {
|
||||
|
@ -130,7 +131,7 @@ void Manager::SendHeartbeats()
|
|||
void Manager::StartHeartbeatTimer()
|
||||
{
|
||||
heartbeat_timer_running = true;
|
||||
zeek::detail::timer_mgr->Add(new detail::HeartbeatTimer(zeek::net::network_time + zeek::BifConst::Threading::heartbeat_interval));
|
||||
zeek::detail::timer_mgr->Add(new detail::HeartbeatTimer(zeek::run_state::network_time + zeek::BifConst::Threading::heartbeat_interval));
|
||||
}
|
||||
|
||||
// Raise everything in here as warnings so it is passed to scriptland without
|
||||
|
@ -191,10 +192,10 @@ void Manager::Flush()
|
|||
{
|
||||
bool do_beat = false;
|
||||
|
||||
if ( zeek::net::network_time && (zeek::net::network_time > next_beat || ! next_beat) )
|
||||
if ( zeek::run_state::network_time && (zeek::run_state::network_time > next_beat || ! next_beat) )
|
||||
{
|
||||
do_beat = true;
|
||||
next_beat = ::zeek::net::network_time + zeek::BifConst::Threading::heartbeat_interval;
|
||||
next_beat = ::zeek::run_state::network_time + zeek::BifConst::Threading::heartbeat_interval;
|
||||
}
|
||||
|
||||
did_process = false;
|
||||
|
@ -213,7 +214,7 @@ void Manager::Flush()
|
|||
|
||||
if ( msg->Process() )
|
||||
{
|
||||
if ( zeek::net::network_time )
|
||||
if ( zeek::run_state::network_time )
|
||||
did_process = true;
|
||||
}
|
||||
|
||||
|
@ -253,7 +254,7 @@ void Manager::Flush()
|
|||
delete t;
|
||||
}
|
||||
|
||||
// fprintf(stderr, "P %.6f %.6f do_beat=%d did_process=%d next_next=%.6f\n", zeek::net::network_time,
|
||||
// fprintf(stderr, "P %.6f %.6f do_beat=%d did_process=%d next_next=%.6f\n", zeek::run_state::network_time,
|
||||
// zeek::detail::timer_mgr->Time(), do_beat, (int)did_process, next_beat);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue