broker integration: add Comm::enable function

Works like old enable_communication(), but for new broker communication
mechanism.  Scripts have to explicitly call this if they want to use the
broker communication functionality.  Saves a decent chunk of Bros'
initialization time when one doesn't need communication features.
This commit is contained in:
Jon Siwek 2015-02-03 16:38:56 -06:00
parent 0cf982f1d1
commit 4dfec04135
12 changed files with 108 additions and 26 deletions

View file

@ -860,12 +860,6 @@ int main(int argc, char** argv)
#ifdef ENABLE_BROKER
comm_mgr = new comm::Manager();
if ( ! comm_mgr->InitPreScript() )
{
fprintf(stderr, "Failed to initialize communication manager.");
exit(1);
}
#endif
plugin_mgr->InitPreScript();
@ -942,11 +936,6 @@ int main(int argc, char** argv)
exit(rc);
}
#ifdef ENABLE_BROKER
comm_mgr->InitPostScript();
iosource_mgr->Register(comm_mgr, true);
#endif
#ifdef USE_PERFTOOLS_DEBUG
}
#endif