mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +00:00
Remove concept of multiple timer managers
- All timers are now handled by a single global timer manager, which simplifies how they handled by the IOSource manager. - This change flows down a number of changes to other parts of the code. The timer manager tag field is removed, which means that matching connections to a timer manager is also removed. This removes the ability to tag a connection as internal or external, since that's how the connections where differentiated. This in turn removes the `current_conns_extern` field from the `ConnStats` record type in the script layer.
This commit is contained in:
parent
2dcc936787
commit
be42608b51
15 changed files with 28 additions and 284 deletions
|
@ -731,7 +731,7 @@ void Analyzer::AddTimer(analyzer_timer_func timer, double t,
|
|||
Timer* analyzer_timer = new
|
||||
AnalyzerTimer(this, timer, t, do_expire, type);
|
||||
|
||||
Conn()->GetTimerMgr()->Add(analyzer_timer);
|
||||
timer_mgr->Add(analyzer_timer);
|
||||
timers.push_back(analyzer_timer);
|
||||
}
|
||||
|
||||
|
@ -751,7 +751,7 @@ void Analyzer::CancelTimers()
|
|||
|
||||
// TODO: could be a for_each
|
||||
for ( auto timer : tmp )
|
||||
Conn()->GetTimerMgr()->Cancel(timer);
|
||||
timer_mgr->Cancel(timer);
|
||||
|
||||
timers_canceled = 1;
|
||||
timers.clear();
|
||||
|
@ -923,4 +923,3 @@ void TransportLayerAnalyzer::PacketContents(const u_char* data, int len)
|
|||
Event(packet_contents, contents);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue