diff --git a/src/Event.cc b/src/Event.cc index 4525118de6..6d449684e5 100644 --- a/src/Event.cc +++ b/src/Event.cc @@ -49,7 +49,11 @@ void Event::Dispatch(bool no_remote) { reporter->BeginErrorHandler(); 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); +#pragma GCC diagnostic pop } catch ( InterpreterException& e ) { diff --git a/src/EventHandler.h b/src/EventHandler.h index cb612eb825..5f8472b2ce 100644 --- a/src/EventHandler.h +++ b/src/EventHandler.h @@ -45,8 +45,19 @@ public: 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); + // 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. explicit operator bool() const;