mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Merge remote-tracking branch 'origin/topic/gilbert/plugin-api-tweak'
* origin/topic/gilbert/plugin-api-tweak: Updating plugin.hooks baseline so that test succeeds Revert spacing change that shouldn't have been included with the previous changeset ... should fix all of the plugin tests save hooks, which needs to be updated. More small fixes Small fixes Incremental Re-updating plugin.hooks test to include new argument output (after merge). Fixing logic errors in HandlePluginResult Updating tests and tweaking HookArgument to include Frame support. Incremental commit: implementing a wrapper for the Val class. Reverting change to const status of network_time. Also, see FIXME: in Func.cc / HandlePluginResult ... Tweaks to result handling to make things a little more sane. Plugin API: minor change (adding parent frame) to support calling methods from hook. Also declare network time update argument to be const because good practice. BIT-1270 #merged Conflicts: testing/btest/Baseline/plugins.hooks/output
This commit is contained in:
commit
6fa03abdbc
12 changed files with 1030 additions and 944 deletions
|
@ -83,6 +83,26 @@ void HookArgument::Describe(ODesc* d) const
|
|||
d->Add("<null>");
|
||||
break;
|
||||
|
||||
case FUNC_RESULT:
|
||||
if ( func_result.first )
|
||||
{
|
||||
if( func_result.second )
|
||||
func_result.second->Describe(d);
|
||||
else
|
||||
d->Add("<null>");
|
||||
}
|
||||
else
|
||||
d->Add("<no result>");
|
||||
|
||||
break;
|
||||
|
||||
case FRAME:
|
||||
if ( arg.frame )
|
||||
d->Add("<frame>");
|
||||
else
|
||||
d->Add("<null>");
|
||||
break;
|
||||
|
||||
case FUNC:
|
||||
if ( arg.func )
|
||||
d->Add(arg.func->Name());
|
||||
|
@ -199,7 +219,7 @@ void Plugin::InitPostScript()
|
|||
|
||||
Plugin::bif_item_list Plugin::BifItems() const
|
||||
{
|
||||
return bif_items;
|
||||
return bif_items;
|
||||
}
|
||||
|
||||
void Plugin::Done()
|
||||
|
@ -271,9 +291,10 @@ int Plugin::HookLoadFile(const std::string& file, const std::string& ext)
|
|||
return -1;
|
||||
}
|
||||
|
||||
Val* Plugin::HookCallFunction(const Func* func, val_list* args)
|
||||
std::pair<bool, Val*> Plugin::HookCallFunction(const Func* func, Frame *parent, val_list* args)
|
||||
{
|
||||
return 0;
|
||||
std::pair<bool, Val*> result(false, NULL);
|
||||
return result;
|
||||
}
|
||||
|
||||
bool Plugin::HookQueueEvent(Event* event)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue