mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
start support for annotation for log field types.
commit before rolling part of it back...
This commit is contained in:
parent
949ec6897a
commit
78b24da7e4
7 changed files with 28 additions and 6 deletions
|
@ -83,7 +83,8 @@ bool LogField::Read(SerializationFormat* fmt)
|
|||
int t;
|
||||
int it;
|
||||
|
||||
bool success = (fmt->Read(&name, "name") && fmt->Read(&t, "type") && fmt->Read(&it, "subtype") );
|
||||
bool success = (fmt->Read(&name, "name") && fmt->Read(&secondary_name, "secondary_name") &&
|
||||
fmt->Read(&t, "type") && fmt->Read(&it, "subtype") );
|
||||
type = (TypeTag) t;
|
||||
subtype = (TypeTag) it;
|
||||
|
||||
|
@ -92,7 +93,8 @@ bool LogField::Read(SerializationFormat* fmt)
|
|||
|
||||
bool LogField::Write(SerializationFormat* fmt) const
|
||||
{
|
||||
return (fmt->Write(name, "name") && fmt->Write((int)type, "type") && fmt->Write((int)subtype, "subtype"));
|
||||
return (fmt->Write(name, "name") && fmt->Write(secondary_name, "secondary_name") && fmt->Write((int)type, "type") &&
|
||||
fmt->Write((int)subtype, "subtype"));
|
||||
}
|
||||
|
||||
LogVal::~LogVal()
|
||||
|
@ -151,7 +153,7 @@ bool LogVal::IsCompatibleType(BroType* t, bool atomic_only)
|
|||
if ( ! t->IsSet() )
|
||||
return false;
|
||||
|
||||
return IsCompatibleType(t->AsSetType()->Indices()->PureType(), true);
|
||||
return IsCompatibleType(t->AsSetType()->Indices()->PureType());
|
||||
}
|
||||
|
||||
case TYPE_VECTOR:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue