mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Fix broker data stores in absence of --enable-debug.
Oops, put too much inside the assert() macro, so the registering of data stores got preprocessed out of optimized builds.
This commit is contained in:
parent
867c4379ea
commit
cb5902d1ad
5 changed files with 18 additions and 5 deletions
4
CHANGES
4
CHANGES
|
@ -1,4 +1,8 @@
|
||||||
|
|
||||||
|
2.3-530 | 2015-03-10 13:22:39 -0500
|
||||||
|
|
||||||
|
* Fix broker data stores in absence of --enable-debug. (Jon Siwek)
|
||||||
|
|
||||||
2.3-529 | 2015-03-09 13:14:27 -0500
|
2.3-529 | 2015-03-09 13:14:27 -0500
|
||||||
|
|
||||||
* Fix format specifier in SSL protocol violation. (Jon Siwek)
|
* Fix format specifier in SSL protocol violation. (Jon Siwek)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
2.3-529
|
2.3-530
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 694af9d9edd188a461cc762bfdb7b61688b93ada
|
Subproject commit 1a49b0e3d23fdfe8da3187dddb310883b641e4a3
|
|
@ -1038,6 +1038,7 @@ bool bro_broker::Manager::CloseStore(const broker::store::identifier& id,
|
||||||
delete it->second->store;
|
delete it->second->store;
|
||||||
it->second->store = nullptr;
|
it->second->store = nullptr;
|
||||||
Unref(it->second);
|
Unref(it->second);
|
||||||
|
data_stores.erase(it);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,8 @@ function BrokerStore::create_master%(id: string, b: BackendType &default = MEMOR
|
||||||
rval = new bro_broker::StoreHandleVal(id_str, type,
|
rval = new bro_broker::StoreHandleVal(id_str, type,
|
||||||
static_cast<BifEnum::BrokerStore::BackendType>(b->AsEnum()),
|
static_cast<BifEnum::BrokerStore::BackendType>(b->AsEnum()),
|
||||||
options->AsRecordVal());
|
options->AsRecordVal());
|
||||||
assert(broker_mgr->AddStore(rval));
|
auto added = broker_mgr->AddStore(rval);
|
||||||
|
assert(added);
|
||||||
return rval;
|
return rval;
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
@ -92,7 +93,8 @@ function BrokerStore::create_clone%(id: string, b: BackendType &default = MEMORY
|
||||||
static_cast<BifEnum::BrokerStore::BackendType>(b->AsEnum()),
|
static_cast<BifEnum::BrokerStore::BackendType>(b->AsEnum()),
|
||||||
options->AsRecordVal(),
|
options->AsRecordVal(),
|
||||||
std::chrono::duration<double>(resync));
|
std::chrono::duration<double>(resync));
|
||||||
assert(broker_mgr->AddStore(rval));
|
auto added = broker_mgr->AddStore(rval);
|
||||||
|
assert(added);
|
||||||
return rval;
|
return rval;
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
@ -115,7 +117,8 @@ function BrokerStore::create_frontend%(id: string%): opaque of BrokerStore::Hand
|
||||||
}
|
}
|
||||||
|
|
||||||
rval = new bro_broker::StoreHandleVal(id_str, type, {}, nullptr);
|
rval = new bro_broker::StoreHandleVal(id_str, type, {}, nullptr);
|
||||||
assert(broker_mgr->AddStore(rval));
|
auto added = broker_mgr->AddStore(rval);
|
||||||
|
assert(added);
|
||||||
return rval;
|
return rval;
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
@ -396,7 +399,12 @@ static bool prepare_for_query(Val* opaque, Frame* frame,
|
||||||
*handle = static_cast<bro_broker::StoreHandleVal*>(opaque);
|
*handle = static_cast<bro_broker::StoreHandleVal*>(opaque);
|
||||||
|
|
||||||
if ( ! (*handle)->store )
|
if ( ! (*handle)->store )
|
||||||
|
{
|
||||||
|
reporter->PushLocation(frame->GetCall()->GetLocationInfo());
|
||||||
|
reporter->Error("BrokerStore query has an invalid data store");
|
||||||
|
reporter->PopLocation();
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
Trigger* trigger = frame->GetTrigger();
|
Trigger* trigger = frame->GetTrigger();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue