diff --git a/CHANGES b/CHANGES index cff111cfca..836733370a 100644 --- a/CHANGES +++ b/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 * Fix format specifier in SSL protocol violation. (Jon Siwek) diff --git a/VERSION b/VERSION index f5e52782d1..4a351a524e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.3-529 +2.3-530 diff --git a/aux/broker b/aux/broker index 694af9d9ed..1a49b0e3d2 160000 --- a/aux/broker +++ b/aux/broker @@ -1 +1 @@ -Subproject commit 694af9d9edd188a461cc762bfdb7b61688b93ada +Subproject commit 1a49b0e3d23fdfe8da3187dddb310883b641e4a3 diff --git a/src/broker/Manager.cc b/src/broker/Manager.cc index eadadea137..ae00134af5 100644 --- a/src/broker/Manager.cc +++ b/src/broker/Manager.cc @@ -1038,6 +1038,7 @@ bool bro_broker::Manager::CloseStore(const broker::store::identifier& id, delete it->second->store; it->second->store = nullptr; Unref(it->second); + data_stores.erase(it); return true; } diff --git a/src/broker/store.bif b/src/broker/store.bif index 6419034b60..e63ae522e6 100644 --- a/src/broker/store.bif +++ b/src/broker/store.bif @@ -48,7 +48,8 @@ function BrokerStore::create_master%(id: string, b: BackendType &default = MEMOR rval = new bro_broker::StoreHandleVal(id_str, type, static_cast(b->AsEnum()), options->AsRecordVal()); - assert(broker_mgr->AddStore(rval)); + auto added = broker_mgr->AddStore(rval); + assert(added); return rval; %} @@ -92,7 +93,8 @@ function BrokerStore::create_clone%(id: string, b: BackendType &default = MEMORY static_cast(b->AsEnum()), options->AsRecordVal(), std::chrono::duration(resync)); - assert(broker_mgr->AddStore(rval)); + auto added = broker_mgr->AddStore(rval); + assert(added); 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); - assert(broker_mgr->AddStore(rval)); + auto added = broker_mgr->AddStore(rval); + assert(added); return rval; %} @@ -396,7 +399,12 @@ static bool prepare_for_query(Val* opaque, Frame* frame, *handle = static_cast(opaque); if ( ! (*handle)->store ) + { + reporter->PushLocation(frame->GetCall()->GetLocationInfo()); + reporter->Error("BrokerStore query has an invalid data store"); + reporter->PopLocation(); return false; + } Trigger* trigger = frame->GetTrigger();