mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 21:18:20 +00:00
Remove BroValUnion by hoisting underlying Val subclass values into subclasses
This commit is contained in:
parent
49ca8e2163
commit
7f92a573d2
29 changed files with 632 additions and 512 deletions
|
@ -318,7 +318,7 @@ Connection* NetSessions::FindConnection(Val* v)
|
|||
return nullptr;
|
||||
|
||||
RecordType* vr = vt->AsRecordType();
|
||||
auto vl = v->AsRecord();
|
||||
auto vl = dynamic_cast<RecordVal*>(v);
|
||||
|
||||
int orig_h, orig_p; // indices into record's value list
|
||||
int resp_h, resp_p;
|
||||
|
@ -346,11 +346,11 @@ Connection* NetSessions::FindConnection(Val* v)
|
|||
// types, too.
|
||||
}
|
||||
|
||||
const IPAddr& orig_addr = (*vl)[orig_h]->AsAddr();
|
||||
const IPAddr& resp_addr = (*vl)[resp_h]->AsAddr();
|
||||
const IPAddr& orig_addr = vl->GetAddrField(orig_h);
|
||||
const IPAddr& resp_addr = vl->GetAddrField(resp_h);
|
||||
|
||||
PortVal* orig_portv = (*vl)[orig_p]->AsPortVal();
|
||||
PortVal* resp_portv = (*vl)[resp_p]->AsPortVal();
|
||||
const PortVal* orig_portv = vl->GetPortValField(orig_p);
|
||||
const PortVal* resp_portv = vl->GetPortValField(resp_p);
|
||||
|
||||
ConnID id;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue