mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 09:38:19 +00:00
Bro's doc mode now terminates after processing bro_init but before net_run
Generated script reST documentation is also written out at this time instead of at the end of lexical scanning. The persistence serializer will no longer write out Bro's state to the .state directory when in doc mode.
This commit is contained in:
parent
481a1d097b
commit
d919ebed58
2 changed files with 15 additions and 12 deletions
14
src/main.cc
14
src/main.cc
|
@ -47,6 +47,8 @@ extern "C" void OPENSSL_add_all_algorithms_conf(void);
|
|||
#include "Stats.h"
|
||||
#include "ConnCompressor.h"
|
||||
#include "DPM.h"
|
||||
#include "BroDoc.h"
|
||||
#include <list>
|
||||
|
||||
#include "binpac_bro.h"
|
||||
|
||||
|
@ -94,6 +96,7 @@ int do_notice_analysis = 0;
|
|||
int rule_bench = 0;
|
||||
int print_loaded_scripts = 0;
|
||||
int generate_documentation = 0;
|
||||
extern std::list<BroDoc*> docs_generated;
|
||||
SecondaryPath* secondary_path = 0;
|
||||
ConnCompressor* conn_compressor = 0;
|
||||
extern char version[];
|
||||
|
@ -971,6 +974,17 @@ int main(int argc, char** argv)
|
|||
|
||||
mgr.Drain();
|
||||
|
||||
if ( generate_documentation )
|
||||
{
|
||||
std::list<BroDoc*>::iterator it;
|
||||
for ( it = docs_generated.begin(); it != docs_generated.end(); ++it )
|
||||
(*it)->WriteDocFile();
|
||||
for ( it = docs_generated.begin(); it != docs_generated.end(); ++it )
|
||||
delete *it;
|
||||
terminate_bro();
|
||||
return 0;
|
||||
}
|
||||
|
||||
have_pending_timers = ! reading_traces && timer_mgr->Size() > 0;
|
||||
|
||||
if ( io_sources.Size() > 0 || have_pending_timers )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue