mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Improve error message when failing to activate a plugin.
Also fix a unit test helper script that checks plugin availability.
This commit is contained in:
parent
a7373a1ca4
commit
d342cde22c
2 changed files with 8 additions and 2 deletions
|
@ -850,9 +850,15 @@ int main(int argc, char** argv)
|
||||||
file_mgr->InitPreScript();
|
file_mgr->InitPreScript();
|
||||||
broxygen_mgr->InitPreScript();
|
broxygen_mgr->InitPreScript();
|
||||||
|
|
||||||
|
bool missing_plugin = false;
|
||||||
|
|
||||||
for ( set<string>::const_iterator i = requested_plugins.begin();
|
for ( set<string>::const_iterator i = requested_plugins.begin();
|
||||||
i != requested_plugins.end(); i++ )
|
i != requested_plugins.end(); i++ )
|
||||||
plugin_mgr->ActivateDynamicPlugin(*i);
|
if ( ! plugin_mgr->ActivateDynamicPlugin(*i) )
|
||||||
|
missing_plugin = true;
|
||||||
|
|
||||||
|
if ( missing_plugin )
|
||||||
|
reporter->FatalError("Failed to activate requested dynamic plugins.");
|
||||||
|
|
||||||
plugin_mgr->ActivateDynamicPlugins(! bare_mode);
|
plugin_mgr->ActivateDynamicPlugins(! bare_mode);
|
||||||
|
|
||||||
|
|
|
@ -3,4 +3,4 @@
|
||||||
# Returns true if Bro has been compiled with support for writer type
|
# Returns true if Bro has been compiled with support for writer type
|
||||||
# $1. The type name must match the plugin name that "bro -N" prints.
|
# $1. The type name must match the plugin name that "bro -N" prints.
|
||||||
|
|
||||||
bro -N $1 >/dev/null
|
bro -N | grep -q $1 >/dev/null
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue