#include <config.h>
#include <util/io/sockaddr_util.h>
+#include <util/memory_segment_local.h>
#include <dns/message.h>
#include <dns/messagerenderer.h>
const isc::datasrc::DataSourceClientPtr
client(new FakeClient(info.data_src_client_ != NULL ?
info.data_src_client_ :
- info.cache_.get(),
+ info.getCacheClient(),
throw_when, isc_exception, fake_rrset));
clients_.push_back(client);
- data_sources_.push_back(DataSourceInfo(client.get(),
- isc::datasrc::DataSourceClientContainerPtr(), false));
+ data_sources_.push_back(
+ DataSourceInfo(client.get(),
+ isc::datasrc::DataSourceClientContainerPtr(),
+ false, RRClass::IN(), mem_sgmt_));
}
}
private:
const boost::shared_ptr<isc::datasrc::ConfigurableClientList> real_;
vector<isc::datasrc::DataSourceClientPtr> clients_;
+ MemorySegmentLocal mem_sgmt_;
};
} // end anonymous namespace for throwing proxy classes
util::MemorySegment& mem_sgmt);
DataSourceClient* data_src_client_;
DataSourceClientContainerPtr container_;
+
+ // Accessor to cache_ in the form of DataSourceClient, hiding
+ // the existence of InMemoryClient as much as possible. We should
+ // really consider cleaner abstraction, but for now it works.
+ // This is also only intended to be used in auth unit tests right now.
+ // No other applications or tests may use it.
+ const DataSourceClient* getCacheClient() const;
boost::shared_ptr<memory::InMemoryClient> cache_;
};