mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
Small fixes
This commit is contained in:
parent
7eadcad674
commit
616ed22572
1 changed files with 11 additions and 11 deletions
|
@ -331,7 +331,7 @@ void Manager::InitPreScript()
|
||||||
assert(! init);
|
assert(! init);
|
||||||
|
|
||||||
for ( plugin_list::iterator i = Manager::ActivePluginsInternal()->begin();
|
for ( plugin_list::iterator i = Manager::ActivePluginsInternal()->begin();
|
||||||
i != Manager::ActivePluginsInternal()->end(); i++ )
|
i != Manager::ActivePluginsInternal()->end(); i++ )
|
||||||
{
|
{
|
||||||
Plugin* plugin = *i;
|
Plugin* plugin = *i;
|
||||||
plugin->DoConfigure();
|
plugin->DoConfigure();
|
||||||
|
@ -346,7 +346,7 @@ void Manager::InitBifs()
|
||||||
bif_init_func_map* bifs = BifFilesInternal();
|
bif_init_func_map* bifs = BifFilesInternal();
|
||||||
|
|
||||||
for ( plugin_list::iterator i = Manager::ActivePluginsInternal()->begin();
|
for ( plugin_list::iterator i = Manager::ActivePluginsInternal()->begin();
|
||||||
i != Manager::ActivePluginsInternal()->end(); i++ )
|
i != Manager::ActivePluginsInternal()->end(); i++ )
|
||||||
{
|
{
|
||||||
bif_init_func_map::const_iterator b = bifs->find((*i)->Name());
|
bif_init_func_map::const_iterator b = bifs->find((*i)->Name());
|
||||||
|
|
||||||
|
@ -363,7 +363,7 @@ void Manager::InitPostScript()
|
||||||
assert(init);
|
assert(init);
|
||||||
|
|
||||||
for ( plugin_list::iterator i = Manager::ActivePluginsInternal()->begin();
|
for ( plugin_list::iterator i = Manager::ActivePluginsInternal()->begin();
|
||||||
i != Manager::ActivePluginsInternal()->end(); i++ )
|
i != Manager::ActivePluginsInternal()->end(); i++ )
|
||||||
(*i)->InitPostScript();
|
(*i)->InitPostScript();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -372,7 +372,7 @@ void Manager::FinishPlugins()
|
||||||
assert(init);
|
assert(init);
|
||||||
|
|
||||||
for ( plugin_list::iterator i = Manager::ActivePluginsInternal()->begin();
|
for ( plugin_list::iterator i = Manager::ActivePluginsInternal()->begin();
|
||||||
i != Manager::ActivePluginsInternal()->end(); i++ )
|
i != Manager::ActivePluginsInternal()->end(); i++ )
|
||||||
(*i)->Done();
|
(*i)->Done();
|
||||||
|
|
||||||
Manager::ActivePluginsInternal()->clear();
|
Manager::ActivePluginsInternal()->clear();
|
||||||
|
@ -505,13 +505,13 @@ void Manager::DisableHook(HookType hook, Plugin* plugin)
|
||||||
void Manager::RequestEvent(EventHandlerPtr handler, Plugin* plugin)
|
void Manager::RequestEvent(EventHandlerPtr handler, Plugin* plugin)
|
||||||
{
|
{
|
||||||
DBG_LOG(DBG_PLUGINS, "Plugin %s requested event %s",
|
DBG_LOG(DBG_PLUGINS, "Plugin %s requested event %s",
|
||||||
plugin->Name().c_str(), handler->Name());
|
plugin->Name().c_str(), handler->Name());
|
||||||
handler->SetGenerateAlways();
|
handler->SetGenerateAlways();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Manager::RequestBroObjDtor(BroObj* obj, Plugin* plugin)
|
void Manager::RequestBroObjDtor(BroObj* obj, Plugin* plugin)
|
||||||
{
|
{
|
||||||
obj->NotifyPluginsOnDtor();
|
obj->NotifyPluginsOnDtor();
|
||||||
}
|
}
|
||||||
|
|
||||||
int Manager::HookLoadFile(const string& file)
|
int Manager::HookLoadFile(const string& file)
|
||||||
|
@ -566,14 +566,14 @@ std::pair<Val*, bool> Manager::HookCallFunction(const Func* func, Frame* parent,
|
||||||
if ( HavePluginForHook(META_HOOK_PRE) )
|
if ( HavePluginForHook(META_HOOK_PRE) )
|
||||||
{
|
{
|
||||||
args.push_back(HookArgument(func));
|
args.push_back(HookArgument(func));
|
||||||
args.push_back(HookArgument(parent));
|
args.push_back(HookArgument(parent));
|
||||||
args.push_back(HookArgument(vargs));
|
args.push_back(HookArgument(vargs));
|
||||||
MetaHookPre(HOOK_CALL_FUNCTION, args);
|
MetaHookPre(HOOK_CALL_FUNCTION, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
hook_list* l = hooks[HOOK_CALL_FUNCTION];
|
hook_list* l = hooks[HOOK_CALL_FUNCTION];
|
||||||
|
|
||||||
std::pair<Val*, bool> v;
|
std::pair<Val*, bool> v = std::pair<Val*, bool>(NULL, false);
|
||||||
|
|
||||||
if ( l )
|
if ( l )
|
||||||
for ( hook_list::iterator i = l->begin(); i != l->end(); ++i )
|
for ( hook_list::iterator i = l->begin(); i != l->end(); ++i )
|
||||||
|
@ -583,10 +583,10 @@ std::pair<Val*, bool> Manager::HookCallFunction(const Func* func, Frame* parent,
|
||||||
v = p->HookCallFunction(func, parent, vargs);
|
v = p->HookCallFunction(func, parent, vargs);
|
||||||
|
|
||||||
if ( v.second )
|
if ( v.second )
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( HavePluginForHook(META_HOOK_POST) )
|
if ( HavePluginForHook(META_HOOK_POST) )
|
||||||
MetaHookPost(HOOK_CALL_FUNCTION, args, HookArgument(v));
|
MetaHookPost(HOOK_CALL_FUNCTION, args, HookArgument(v));
|
||||||
|
@ -674,7 +674,7 @@ void Manager::HookBroObjDtor(void* obj) const
|
||||||
{
|
{
|
||||||
HookArgumentList args;
|
HookArgumentList args;
|
||||||
|
|
||||||
if ( HavePluginForHook(META_HOOK_PRE) )
|
if ( HavePluginForHook(META_HOOK_PRE) )
|
||||||
{
|
{
|
||||||
args.push_back(obj);
|
args.push_back(obj);
|
||||||
MetaHookPre(HOOK_BRO_OBJ_DTOR, args);
|
MetaHookPre(HOOK_BRO_OBJ_DTOR, args);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue