mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
Fix -N option to work with builtin plugins as well.
This commit is contained in:
parent
0cc49b8769
commit
7d95ebb48a
3 changed files with 16 additions and 1 deletions
4
CHANGES
4
CHANGES
|
@ -1,4 +1,8 @@
|
|||
|
||||
2.3-883 | 2015-04-23 07:10:36 -0700
|
||||
|
||||
* Fix -N option to work with builtin plugins as well. (Robin Sommer)
|
||||
|
||||
2.3-882 | 2015-04-23 06:59:40 -0700
|
||||
|
||||
* Add missing .pac dependencies for some binpac analyzer targets.
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
2.3-882
|
||||
2.3-883
|
||||
|
|
|
@ -143,6 +143,17 @@ bool Manager::ActivateDynamicPluginInternal(const std::string& name, bool ok_if_
|
|||
if ( ok_if_not_found )
|
||||
return true;
|
||||
|
||||
// Check if it's a static built-in plugin; they are always
|
||||
// active, so just ignore. Not the most efficient way, but
|
||||
// this should be rare to begin with.
|
||||
plugin_list* all_plugins = Manager::ActivePluginsInternal();
|
||||
|
||||
for ( plugin::Manager::plugin_list::const_iterator i = all_plugins->begin(); i != all_plugins->end(); i++ )
|
||||
{
|
||||
if ( (*i)->Name() == name )
|
||||
return true;
|
||||
}
|
||||
|
||||
reporter->Error("plugin %s is not available", name.c_str());
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue