mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
Remove variant from StdFunctionStmt
The variant ended up conflicting with std::bind, which resulted in failures on the btest invoking it. Change back to a single function that takes a flow, and default it to a value in Exec.
This commit is contained in:
parent
8bfe32e931
commit
9de1dd16d5
6 changed files with 14 additions and 17 deletions
|
@ -15,17 +15,17 @@ Foo::Foo(zeek::Connection* conn) : zeek::analyzer::tcp::TCP_ApplicationAnalyzer(
|
|||
|
||||
auto handler = zeek::event_registry->Lookup("connection_established");
|
||||
if ( handler ) {
|
||||
handler->GetFunc()->AddBody([](const zeek::Args& args) {
|
||||
handler->GetFunc()->AddBody([](const zeek::Args& args, zeek::detail::StmtFlowType& flow) {
|
||||
printf("c++ connection_established lambda handler, received %zu arguments\n", args.size());
|
||||
});
|
||||
|
||||
handler->GetFunc()->AddBody(std::bind(&Foo::ConnectionEstablishedHandler, this, _1));
|
||||
handler->GetFunc()->AddBody(std::bind(&Foo::ConnectionEstablishedHandler, this, _1, _2));
|
||||
}
|
||||
}
|
||||
|
||||
Foo::~Foo() { delete interp; }
|
||||
|
||||
void Foo::ConnectionEstablishedHandler(const zeek::Args& args) {
|
||||
void Foo::ConnectionEstablishedHandler(const zeek::Args& args, zeek::detail::StmtFlowType& flow) {
|
||||
printf("c++ connection_established member handler, received %zu arguments\n", args.size());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue