mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Deprecate HOOK_BRO_OBJ_DTOR and related methods
This commit is contained in:
parent
4d4c6280e9
commit
1496b99a34
9 changed files with 112 additions and 15 deletions
|
@ -669,6 +669,11 @@ void Manager::RequestBroObjDtor(Obj* obj, Plugin* plugin)
|
|||
obj->NotifyPluginsOnDtor();
|
||||
}
|
||||
|
||||
void Manager::RequestObjDtor(Obj* obj, Plugin* plugin)
|
||||
{
|
||||
obj->NotifyPluginsOnDtor();
|
||||
}
|
||||
|
||||
int Manager::HookLoadFile(const Plugin::LoadType type, const string& file, const string& resolved)
|
||||
{
|
||||
HookArgumentList args;
|
||||
|
@ -905,6 +910,29 @@ void Manager::HookBroObjDtor(void* obj) const
|
|||
MetaHookPost(HOOK_BRO_OBJ_DTOR, args, HookArgument());
|
||||
}
|
||||
|
||||
void Manager::HookObjDtor(void* obj) const
|
||||
{
|
||||
HookArgumentList args;
|
||||
|
||||
if ( HavePluginForHook(META_HOOK_PRE) )
|
||||
{
|
||||
args.push_back(HookArgument(obj));
|
||||
MetaHookPre(HOOK_OBJ_DTOR, args);
|
||||
}
|
||||
|
||||
hook_list* l = hooks[HOOK_OBJ_DTOR];
|
||||
|
||||
if ( l )
|
||||
for ( hook_list::iterator i = l->begin(); i != l->end(); ++i )
|
||||
{
|
||||
Plugin* p = (*i).second;
|
||||
p->HookObjDtor(obj);
|
||||
}
|
||||
|
||||
if ( HavePluginForHook(META_HOOK_POST) )
|
||||
MetaHookPost(HOOK_OBJ_DTOR, args, HookArgument());
|
||||
}
|
||||
|
||||
void Manager::HookLogInit(const std::string& writer, const std::string& instantiating_filter,
|
||||
bool local, bool remote, const logging::WriterBackend::WriterInfo& info,
|
||||
int num_fields, const threading::Field* const* fields) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue