diff --git a/CHANGES b/CHANGES index db9e947294..c4d0dc1d48 100644 --- a/CHANGES +++ b/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. diff --git a/VERSION b/VERSION index 3f2471b34b..ea3fe0690b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.3-882 +2.3-883 diff --git a/src/plugin/Manager.cc b/src/plugin/Manager.cc index 733f62dba9..8e58c1296b 100644 --- a/src/plugin/Manager.cc +++ b/src/plugin/Manager.cc @@ -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; }