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
|
@ -48,7 +48,7 @@ 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* frame, val_list* args)
|
||||
{
|
||||
ODesc d;
|
||||
d.SetShort();
|
||||
|
@ -57,7 +57,7 @@ Val* Plugin::HookCallFunction(const Func* func, val_list* args)
|
|||
fprintf(stderr, "%.6f %-15s %s\n", network_time, "| HookCallFunction",
|
||||
d.Description());
|
||||
|
||||
return 0;
|
||||
return std::pair<bool, Val*>(false, NULL);
|
||||
}
|
||||
|
||||
bool Plugin::HookQueueEvent(Event* event)
|
||||
|
|
|
@ -11,7 +11,7 @@ class Plugin : public ::plugin::Plugin
|
|||
{
|
||||
protected:
|
||||
virtual int HookLoadFile(const std::string& file, const std::string& ext);
|
||||
virtual Val* HookCallFunction(const Func* func, val_list* args);
|
||||
virtual std::pair<bool, Val*> HookCallFunction(const Func* func, Frame* frame, val_list* args);
|
||||
virtual bool HookQueueEvent(Event* event);
|
||||
virtual void HookDrainEvents();
|
||||
virtual void HookUpdateNetworkTime(double network_time);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue