mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
broker/Eventhandler: Deprecate Broker::auto_publish() for v8.1
Relates to #3637
This commit is contained in:
parent
455e05bc2e
commit
6abb9d7eda
6 changed files with 29 additions and 5 deletions
|
@ -136,14 +136,20 @@ function Broker::__publish_id%(topic: string, id: string%): bool
|
|||
function Broker::__auto_publish%(topic: string, ev: any%): bool
|
||||
%{
|
||||
zeek::Broker::Manager::ScriptScopeGuard ssg;
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
auto rval = zeek::broker_mgr->AutoPublishEvent(topic->CheckString(), ev);
|
||||
#pragma GCC diagnostic pop
|
||||
return zeek::val_mgr->Bool(rval);
|
||||
%}
|
||||
|
||||
function Broker::__auto_unpublish%(topic: string, ev: any%): bool
|
||||
%{
|
||||
zeek::Broker::Manager::ScriptScopeGuard ssg;
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
auto rval = zeek::broker_mgr->AutoUnpublishEvent(topic->CheckString(), ev);
|
||||
#pragma GCC diagnostic pop
|
||||
return zeek::val_mgr->Bool(rval);
|
||||
%}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue