mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 13:08:20 +00:00
Adapt to a broker API change.
This commit is contained in:
parent
e5adc768cc
commit
d2747547b7
2 changed files with 4 additions and 5 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 8cc208192b4b692a082e22c8dd89c44f69e824d7
|
||||
Subproject commit 98da283ba2bc4dc20e67830395299defc21724db
|
|
@ -164,13 +164,12 @@ function Store::insert%(h: opaque of Store::Handle,
|
|||
auto& val = comm::opaque_field_to_data(v->AsRecordVal(), frame);
|
||||
|
||||
using broker::store::expiration_time;
|
||||
broker::util::optional<expiration_time> expiry;
|
||||
|
||||
auto abs_expiry_val = e->AsRecordVal()->Lookup(0);
|
||||
|
||||
if ( abs_expiry_val )
|
||||
{
|
||||
expiry = expiration_time(abs_expiry_val->AsTime());
|
||||
auto expiry = expiration_time(abs_expiry_val->AsTime());
|
||||
handle->store->insert(key, val, expiry);
|
||||
return new Val(true, TYPE_BOOL);
|
||||
}
|
||||
|
@ -180,12 +179,12 @@ function Store::insert%(h: opaque of Store::Handle,
|
|||
if ( rel_expiry_val )
|
||||
{
|
||||
auto ct = broker::time_point::now().value;
|
||||
expiry = expiration_time(rel_expiry_val->AsInterval(), ct);
|
||||
auto expiry = expiration_time(rel_expiry_val->AsInterval(), ct);
|
||||
handle->store->insert(key, val, expiry);
|
||||
return new Val(true, TYPE_BOOL);
|
||||
}
|
||||
|
||||
handle->store->insert(key, val, expiry);
|
||||
handle->store->insert(key, val);
|
||||
return new Val(true, TYPE_BOOL);
|
||||
%}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue