mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Deprecate global Val pointers in NetVar.h
All of these have fairly niche uses, so better maintained as lookup/static closer to the usage site.
This commit is contained in:
parent
c0986f0739
commit
d34b24e776
13 changed files with 83 additions and 49 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <openssl/evp.h>
|
||||
|
||||
#include "NetVar.h"
|
||||
#include "Var.h"
|
||||
#include "digest.h"
|
||||
#include "highwayhash/sip_hash.h"
|
||||
|
||||
|
@ -22,10 +23,12 @@ Hasher::seed_t Hasher::MakeSeed(const void* data, size_t size)
|
|||
|
||||
assert(sizeof(tmpseed) == 16);
|
||||
|
||||
static auto global_hash_seed = zeek::lookup_val<StringVal>("global_hash_seed");
|
||||
|
||||
if ( data )
|
||||
hash_update(ctx, data, size);
|
||||
|
||||
else if ( global_hash_seed && global_hash_seed->Len() > 0 )
|
||||
else if ( global_hash_seed->Len() > 0 )
|
||||
hash_update(ctx, global_hash_seed->Bytes(), global_hash_seed->Len());
|
||||
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue