mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +00:00
Fixing problem with type list.
This commit is contained in:
parent
a41efd495d
commit
ae4066dcf8
1 changed files with 7 additions and 3 deletions
10
src/bro.bif
10
src/bro.bif
|
@ -5902,11 +5902,15 @@ function hll_cardinality_add%(elem: any, index: any%): bool
|
||||||
int status = 0;
|
int status = 0;
|
||||||
uint64_t a = 123456;
|
uint64_t a = 123456;
|
||||||
|
|
||||||
CompositeHash* hll_hash = new CompositeHash(new TypeList(elem->Type()));
|
TypeList* tl = new TypeList(elem->Type());
|
||||||
if(hll_counters.count(*s) > 0)
|
tl->Append(elem->Type());
|
||||||
|
CompositeHash* hll_hash = new CompositeHash(tl);
|
||||||
|
Unref(tl);
|
||||||
|
|
||||||
|
if( hll_counters.count(*s) > 0 )
|
||||||
{
|
{
|
||||||
CardinalityCounter* h = hll_counters[*s];
|
CardinalityCounter* h = hll_counters[*s];
|
||||||
HashKey* key = hll_hash->ComputeHash(elem,1);
|
HashKey* key = hll_hash->ComputeHash(elem, 1);
|
||||||
a = (key->Hash());
|
a = (key->Hash());
|
||||||
h->addElement(a);
|
h->addElement(a);
|
||||||
status = 1;
|
status = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue