mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Rework setting adding ports to map slightly
This commit is contained in:
parent
11be8888d7
commit
bd52ab1a55
1 changed files with 3 additions and 4 deletions
|
@ -3972,10 +3972,9 @@ const PortValPtr& ValManager::Port(uint32_t port_num, TransportProto port_type)
|
||||||
port_num = 0;
|
port_num = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t port_masked = PortVal::Mask(port_num, port_type);
|
auto port_masked = PortVal::Mask(port_num, port_type);
|
||||||
if ( ports.find(port_masked) == ports.end() )
|
if ( ports.count(port_masked) == 0 )
|
||||||
ports[port_masked] = IntrusivePtr{AdoptRef{},
|
ports.insert({port_masked, make_intrusive<PortVal>(port_masked)});
|
||||||
new PortVal(PortVal::Mask(port_num, port_type))};
|
|
||||||
|
|
||||||
return ports[port_masked];
|
return ports[port_masked];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue