mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
EventHandler: Deprecate Call(args, no_remote, ts), add Call(args)
The ts parameter was only added to Call() for the Broker::auto_publish() functionality and propagating the network timestamp. By now, the auto-publish functionality is deprecated, so it'd be good to cleanup that signature. There won't be any need for no_remote in the future either. Allow users to just use Call() instead.
This commit is contained in:
parent
b535f03382
commit
f7425b805d
2 changed files with 15 additions and 0 deletions
|
@ -49,7 +49,11 @@ void Event::Dispatch(bool no_remote) {
|
||||||
reporter->BeginErrorHandler();
|
reporter->BeginErrorHandler();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
// Replace in v8.1 with handler->Call(&args).
|
||||||
handler->Call(&args, no_remote, ts);
|
handler->Call(&args, no_remote, ts);
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
catch ( InterpreterException& e ) {
|
catch ( InterpreterException& e ) {
|
||||||
|
|
|
@ -45,8 +45,19 @@ public:
|
||||||
auto_publish.erase(topic);
|
auto_publish.erase(topic);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[deprecated(
|
||||||
|
"Remove in v8.1. The no_remote and ts parameters are AutoPublish() specific and won't have an effect "
|
||||||
|
"in the future. Use Call(args)")]]
|
||||||
void Call(zeek::Args* vl, bool no_remote = false, double ts = run_state::network_time);
|
void Call(zeek::Args* vl, bool no_remote = false, double ts = run_state::network_time);
|
||||||
|
|
||||||
|
// Call the function associated with this handler.
|
||||||
|
void Call(zeek::Args* vl) {
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
Call(vl, false, run_state::network_time);
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
}
|
||||||
|
|
||||||
// Returns true if there is at least one local or remote handler.
|
// Returns true if there is at least one local or remote handler.
|
||||||
explicit operator bool() const;
|
explicit operator bool() const;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue