Commit 3194a201 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[2862] Reset the segment upon command

parent 7cd60567
......@@ -627,7 +627,21 @@ private:
}
void doSegmentUpdate(const isc::data::ConstElementPtr& arg) {
(void) arg;
// TODO: Error handling. Invalid RRClass, non-existing stuff, exceptions
const isc::dns::RRClass
rrclass(arg->get("data-source-class")->stringValue());
const std::string& name(arg->get("data-source-name")->stringValue());
const isc::data::ConstElementPtr& segment_params =
arg->get("segment-params");
typename MutexType::Locker locker(*map_mutex_);
const boost::shared_ptr<isc::datasrc::ConfigurableClientList>& list =
(**clients_map_)[rrclass];
if (!list) {
// TODO: Log error
return;
}
list->resetMemorySegment(name,
isc::datasrc::memory::ZoneTableSegment::READ_ONLY, segment_params);
}
void doLoadZone(const isc::data::ConstElementPtr& arg);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment