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
|
@ -1193,8 +1193,8 @@ WriterFrontend* Manager::CreateWriter(EnumVal* id, EnumVal* writer, WriterBacken
|
|||
|
||||
// Still need to set the WriterInfo's rotation parameters, which we
|
||||
// computed above.
|
||||
const char* base_time = log_rotate_base_time ?
|
||||
log_rotate_base_time->AsString()->CheckString() : nullptr;
|
||||
static auto log_rotate_base_time = zeek::lookup_val<StringVal>("log_rotate_base_time");
|
||||
static auto base_time = log_rotate_base_time->AsString()->CheckString();
|
||||
|
||||
winfo->info->rotation_interval = winfo->interval;
|
||||
winfo->info->rotation_base = parse_rotate_base_time(base_time);
|
||||
|
@ -1453,8 +1453,8 @@ void Manager::InstallRotationTimer(WriterInfo* winfo)
|
|||
if ( ! winfo->open_time )
|
||||
winfo->open_time = network_time;
|
||||
|
||||
const char* base_time = log_rotate_base_time ?
|
||||
log_rotate_base_time->AsString()->CheckString() : nullptr;
|
||||
static auto log_rotate_base_time = zeek::lookup_val<StringVal>("log_rotate_base_time");
|
||||
static auto base_time = log_rotate_base_time->AsString()->CheckString();
|
||||
|
||||
double base = parse_rotate_base_time(base_time);
|
||||
double delta_t =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue