mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Merge remote branch 'origin/topic/jsiwek/pybroccoli-fixes' into topic/policy-scripts-new
This commit is contained in:
commit
8b9c1f1dcd
7 changed files with 48 additions and 18 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 14a7cfe4ea2ff6c7f5301dcb81a869adcd6e9834
|
Subproject commit 1a610bced1c83644a5bfaeb6e98cf75380fe61a1
|
|
@ -1 +1 @@
|
||||||
Subproject commit f096c0e4088f2d92743e0c28077f086dff216cce
|
Subproject commit a9aeb2e1a8434c583c75f5941b58dc69a7517444
|
|
@ -69,7 +69,32 @@ void EventHandler::Call(val_list* vl, bool no_remote)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( local )
|
if ( local )
|
||||||
|
{
|
||||||
|
if ( FType() )
|
||||||
|
{
|
||||||
|
const type_list* arg_types = type->ArgTypes()->Types();
|
||||||
|
loop_over_list(*vl, i)
|
||||||
|
{
|
||||||
|
Val* v = (*vl)[i];
|
||||||
|
BroType* va_t = v->Type();
|
||||||
|
BroType* ar_t = (*arg_types)[i];
|
||||||
|
if ( va_t->Tag() == TYPE_RECORD && ar_t->Tag() == TYPE_RECORD )
|
||||||
|
{
|
||||||
|
if ( ! same_type(va_t, ar_t) )
|
||||||
|
{
|
||||||
|
Val* nv;
|
||||||
|
nv = v->AsRecordVal()->CoerceTo(ar_t->AsRecordType());
|
||||||
|
if ( nv )
|
||||||
|
{
|
||||||
|
vl->replace(i, nv);
|
||||||
|
Unref(v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Unref(local->Call(vl));
|
Unref(local->Call(vl));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
loop_over_list(*vl, i)
|
loop_over_list(*vl, i)
|
||||||
|
|
28
src/main.cc
28
src/main.cc
|
@ -739,6 +739,20 @@ int main(int argc, char** argv)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if ( generate_documentation )
|
||||||
|
{
|
||||||
|
std::list<BroDoc*>::iterator it;
|
||||||
|
|
||||||
|
for ( it = docs_generated.begin(); it != docs_generated.end(); ++it )
|
||||||
|
(*it)->WriteDocFile();
|
||||||
|
|
||||||
|
for ( it = docs_generated.begin(); it != docs_generated.end(); ++it )
|
||||||
|
delete *it;
|
||||||
|
|
||||||
|
terminate_bro();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if ( nerr > 0 )
|
if ( nerr > 0 )
|
||||||
{
|
{
|
||||||
delete dns_mgr;
|
delete dns_mgr;
|
||||||
|
@ -973,20 +987,6 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
mgr.Drain();
|
mgr.Drain();
|
||||||
|
|
||||||
if ( generate_documentation )
|
|
||||||
{
|
|
||||||
std::list<BroDoc*>::iterator it;
|
|
||||||
|
|
||||||
for ( it = docs_generated.begin(); it != docs_generated.end(); ++it )
|
|
||||||
(*it)->WriteDocFile();
|
|
||||||
|
|
||||||
for ( it = docs_generated.begin(); it != docs_generated.end(); ++it )
|
|
||||||
delete *it;
|
|
||||||
|
|
||||||
terminate_bro();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
have_pending_timers = ! reading_traces && timer_mgr->Size() > 0;
|
have_pending_timers = ! reading_traces && timer_mgr->Size() > 0;
|
||||||
|
|
||||||
if ( io_sources.Size() > 0 || have_pending_timers )
|
if ( io_sources.Size() > 0 || have_pending_timers )
|
||||||
|
|
|
@ -11,4 +11,9 @@ Servus
|
||||||
0.0
|
0.0
|
||||||
192.168.0.0/16
|
192.168.0.0/16
|
||||||
==== record
|
==== record
|
||||||
|
[a=42, b=6.6.7.7]
|
||||||
42, 6.6.7.7
|
42, 6.6.7.7
|
||||||
|
==== coerced record
|
||||||
|
[a=13, b=<uninitialized>, c=helloworld]
|
||||||
|
13
|
||||||
|
helloworld
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# @TEST-REQUIRES: grep -vq '#define BROv6' $BUILD/config.h
|
# @TEST-REQUIRES: grep -vq '#define BROv6' $BUILD/config.h
|
||||||
# @TEST-REQUIRES: test -e $BUILD/aux/broccoli/src/libbroccoli.so
|
# @TEST-REQUIRES: test -e $BUILD/aux/broccoli/src/libbroccoli.so || test -e $BUILD/aux/broccoli/src/libbroccoli.dylib
|
||||||
#
|
#
|
||||||
# @TEST-EXEC: btest-bg-run bro bro %INPUT $DIST/aux/broccoli/test/broping-record.bro
|
# @TEST-EXEC: btest-bg-run bro bro %INPUT $DIST/aux/broccoli/test/broping-record.bro
|
||||||
# @TEST-EXEC: btest-bg-run broccoli $BUILD/aux/broccoli/test/broping -r -c 3 127.0.0.1
|
# @TEST-EXEC: btest-bg-run broccoli $BUILD/aux/broccoli/test/broping -r -c 3 127.0.0.1
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# @TEST-REQUIRES: grep -vq '#define BROv6' $BUILD/config.h
|
# @TEST-REQUIRES: grep -vq '#define BROv6' $BUILD/config.h
|
||||||
# @TEST-REQUIRES: test -e $BUILD/aux/broccoli/src/libbroccoli.so
|
# @TEST-REQUIRES: test -e $BUILD/aux/broccoli/src/libbroccoli.so || test -e $BUILD/aux/broccoli/src/libbroccoli.dylib
|
||||||
# @TEST-REQUIRES: test -e $BUILD/aux/broccoli/bindings/broccoli-python/_broccoli_intern.so
|
# @TEST-REQUIRES: test -e $BUILD/aux/broccoli/bindings/broccoli-python/_broccoli_intern.so
|
||||||
#
|
#
|
||||||
# @TEST-EXEC: btest-bg-run bro bro %INPUT $DIST/aux/broccoli/bindings/broccoli-python/tests/test.bro
|
# @TEST-EXEC: btest-bg-run bro bro %INPUT $DIST/aux/broccoli/bindings/broccoli-python/tests/test.bro
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue