Plugins: Change order in which plugins' scripts are loaded at startup.

We now load the top-level  __init__.bro before the internal bif.bro so
that the former can define types used by the latter.
This commit is contained in:
Robin Sommer 2014-10-23 14:20:59 -07:00
parent 2002fd7f90
commit 3e508d316a
7 changed files with 15 additions and 12 deletions

View file

@ -172,7 +172,7 @@ bool Manager::ActivateDynamicPluginInternal(const std::string& name, bool ok_if_
// Load {bif,scripts}/__load__.bro automatically.
string init = dir + "lib/bif/__load__.bro";
string init = dir + "scripts/__load__.bro";
if ( is_file(init) )
{
@ -180,7 +180,7 @@ bool Manager::ActivateDynamicPluginInternal(const std::string& name, bool ok_if_
scripts_to_load.push_back(init);
}
init = dir + "scripts/__load__.bro";
init = dir + "lib/bif/__load__.bro";
if ( is_file(init) )
{