mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
logging/Manager: Fix slot logic
This commit is contained in:
parent
f17ca010bc
commit
7ae53aea04
1 changed files with 4 additions and 2 deletions
|
@ -1654,14 +1654,16 @@ detail::LogRecord Manager::RecordToLogRecord(WriterInfo* info, Filter* filter, c
|
||||||
|
|
||||||
for ( int index : indices ) {
|
for ( int index : indices ) {
|
||||||
auto vr = val->AsRecord();
|
auto vr = val->AsRecord();
|
||||||
val = vr->RawOptField(index);
|
const auto& slot = vr->RawOptField(index);
|
||||||
|
|
||||||
if ( ! val ) {
|
if ( ! slot.IsSet() ) {
|
||||||
// Value, or any of its parents, is not set.
|
// Value, or any of its parents, is not set.
|
||||||
vals.emplace_back(filter->fields[i]->type, false);
|
vals.emplace_back(filter->fields[i]->type, false);
|
||||||
|
val = std::nullopt;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val = *slot;
|
||||||
vt = cast_intrusive<RecordType>(vr->GetType())->GetFieldType(index).get();
|
vt = cast_intrusive<RecordType>(vr->GetType())->GetFieldType(index).get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue