Implement the zeek_init handler.

Implements the change and a test.
This commit is contained in:
Seth Hall 2019-04-12 22:29:40 +02:00
parent f96bc81f85
commit 8cefb9be42
118 changed files with 229 additions and 165 deletions

View file

@ -138,7 +138,7 @@ Manager::Manager(bool arg_reading_pcaps)
{
bound_port = 0;
reading_pcaps = arg_reading_pcaps;
after_bro_init = false;
after_zeek_init = false;
peer_count = 0;
log_topic_func = nullptr;
vector_of_data_type = nullptr;
@ -772,7 +772,7 @@ RecordVal* Manager::MakeEvent(val_list* args, Frame* frame)
bool Manager::Subscribe(const string& topic_prefix)
{
DBG_LOG(DBG_BROKER, "Subscribing to topic prefix %s", topic_prefix.c_str());
bstate->subscriber.add_topic(topic_prefix, ! after_bro_init);
bstate->subscriber.add_topic(topic_prefix, ! after_zeek_init);
return true;
}
@ -799,7 +799,7 @@ bool Manager::Unsubscribe(const string& topic_prefix)
}
DBG_LOG(DBG_BROKER, "Unsubscribing from topic prefix %s", topic_prefix.c_str());
bstate->subscriber.remove_topic(topic_prefix, ! after_bro_init);
bstate->subscriber.remove_topic(topic_prefix, ! after_zeek_init);
return true;
}