mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 21:48:21 +00:00
Merge remote-tracking branch 'origin/topic/jsiwek/path-func-record-demote'
* origin/topic/jsiwek/path-func-record-demote: Fix filter path_func to allow record argument as a subset of stream's columns. Conflicts: src/LogMgr.cc Closes #600.
This commit is contained in:
commit
c2e432c5fa
6 changed files with 87 additions and 6 deletions
|
@ -908,7 +908,17 @@ bool LogMgr::Write(EnumVal* id, RecordVal* columns)
|
|||
path_arg = new StringVal("");
|
||||
|
||||
vl.append(path_arg->Ref());
|
||||
vl.append(columns->Ref());
|
||||
|
||||
Val* rec_arg;
|
||||
BroType* rt = filter->path_func->FType()->Args()->FieldType("rec");
|
||||
|
||||
if ( rt->Tag() == TYPE_RECORD )
|
||||
rec_arg = columns->CoerceTo(rt->AsRecordType(), true);
|
||||
else
|
||||
// Can be TYPE_ANY here.
|
||||
rec_arg = columns->Ref();
|
||||
|
||||
vl.append(rec_arg);
|
||||
|
||||
Val* v = filter->path_func->Call(&vl);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue