Only the manager tries to read files with the input framework now.

This commit is contained in:
Seth Hall 2012-10-10 13:00:48 -04:00
parent 5aa12984ee
commit 9ea52fe9cd
2 changed files with 14 additions and 8 deletions

View file

@ -1,5 +1,4 @@
@load ./main
@load ./input
# The cluster framework must be loaded first.
@load base/frameworks/cluster
@ -7,3 +6,6 @@
@if ( Cluster::is_enabled() )
@load ./cluster
@endif
# This needs cluster support to only read on the manager.
@load ./input

View file

@ -15,6 +15,9 @@ event Intel::read_entry(desc: Input::EventDescription, tpe: Input::Event, item:
}
event bro_init() &priority=5
{
if ( ! Cluster::is_enabled() ||
Cluster::local_node_type() == Cluster::MANAGER )
{
for ( a_file in read_files )
{
@ -26,4 +29,5 @@ event bro_init() &priority=5
$ev=Intel::read_entry]);
}
}
}