mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 03:28:19 +00:00
A number of bugfixes for the recent threading updates.
All tests pass now except one: scripts.base.frameworks.metrics.cluster-intermediate-update Couldn't figure out yet why that still fails.
This commit is contained in:
parent
629ec31ec2
commit
df874f0f62
5 changed files with 63 additions and 28 deletions
|
@ -106,8 +106,11 @@ void Manager::Process()
|
|||
|
||||
Message* msg = t->RetrieveOut();
|
||||
|
||||
if ( msg->Process() && network_time )
|
||||
did_process = true;
|
||||
if ( msg->Process() )
|
||||
{
|
||||
if ( network_time )
|
||||
did_process = true;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
|
|
@ -147,7 +147,7 @@ bool Value::Read(SerializationFormat* fmt)
|
|||
|
||||
case TYPE_ADDR:
|
||||
{
|
||||
int family;
|
||||
char family;
|
||||
|
||||
if ( ! fmt->Read(&family, "addr-family") )
|
||||
return false;
|
||||
|
@ -169,7 +169,27 @@ bool Value::Read(SerializationFormat* fmt)
|
|||
|
||||
case TYPE_SUBNET:
|
||||
{
|
||||
// FIXME.
|
||||
char length;
|
||||
char family;
|
||||
|
||||
if ( ! (fmt->Read(&length, "subnet-len") && fmt->Read(&family, "subnet-family")) )
|
||||
return false;
|
||||
|
||||
switch ( family ) {
|
||||
case 4:
|
||||
val.subnet_val.length = (uint8_t)length;
|
||||
val.subnet_val.prefix.family = IPv4;
|
||||
return fmt->Read(&val.subnet_val.prefix.in.in4, "subnet-in4");
|
||||
|
||||
case 6:
|
||||
val.subnet_val.length = (uint8_t)length;
|
||||
val.subnet_val.prefix.family = IPv6;
|
||||
return fmt->Read(&val.subnet_val.prefix.in.in6, "subnet-in6");
|
||||
|
||||
}
|
||||
|
||||
// Can't be reached.
|
||||
abort();
|
||||
}
|
||||
|
||||
case TYPE_DOUBLE:
|
||||
|
@ -250,18 +270,15 @@ bool Value::Write(SerializationFormat* fmt) const
|
|||
case TYPE_PORT:
|
||||
return fmt->Write(val.port_val.port, "port") && fmt->Write(val.port_val.proto, "proto");
|
||||
|
||||
case TYPE_SUBNET:
|
||||
return false; // FIXME.
|
||||
|
||||
case TYPE_ADDR:
|
||||
{
|
||||
switch ( val.addr_val.family ) {
|
||||
case IPv4:
|
||||
return fmt->Write((int)4, "addr-family")
|
||||
return fmt->Write((char)4, "addr-family")
|
||||
&& fmt->Write(val.addr_val.in.in4, "addr-in4");
|
||||
|
||||
case IPv6:
|
||||
return fmt->Write((int)6, "addr-family")
|
||||
return fmt->Write((char)6, "addr-family")
|
||||
&& fmt->Write(val.addr_val.in.in6, "addr-in6");
|
||||
break;
|
||||
}
|
||||
|
@ -270,6 +287,26 @@ bool Value::Write(SerializationFormat* fmt) const
|
|||
abort();
|
||||
}
|
||||
|
||||
case TYPE_SUBNET:
|
||||
{
|
||||
if ( ! fmt->Write((char)val.subnet_val.length, "subnet-length") )
|
||||
return false;
|
||||
|
||||
switch ( val.subnet_val.prefix.family ) {
|
||||
case IPv4:
|
||||
return fmt->Write((char)4, "subnet-family")
|
||||
&& fmt->Write(val.subnet_val.prefix.in.in4, "subnet-in4");
|
||||
|
||||
case IPv6:
|
||||
return fmt->Write((char)6, "subnet-family")
|
||||
&& fmt->Write(val.subnet_val.prefix.in.in6, "subnet-in6");
|
||||
break;
|
||||
}
|
||||
|
||||
// Can't be reached.
|
||||
abort();
|
||||
}
|
||||
|
||||
case TYPE_DOUBLE:
|
||||
case TYPE_TIME:
|
||||
case TYPE_INTERVAL:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue