Commit 07111640 authored by Michal Vaner's avatar Michal Vaner
Browse files

Merge preparation, step 3

The recursor compiles

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/vorner-recursor-config@3432 e5f2f494-b856-4b98-b285-d166d9295462
parent 68d78362
......@@ -86,16 +86,16 @@ public:
}
void setForwardAddresses(const vector<addr_t>& upstream,
IOService* ios)
DNSService *dnss)
{
queryShutdown();
upstream_ = upstream;
if (ios) {
if (dnss) {
if (upstream_.empty()) {
cerr << "[b10-recurse] Asked to do full recursive," << endl <<
"but not implemented yet. I'll do nothing." << endl;
} else {
querySetup(*ios);
querySetup(*dnss);
}
}
}
......@@ -525,7 +525,7 @@ Recursor::updateConfig(ConstElementPtr config) {
void
Recursor::setForwardAddresses(const vector<addr_t>& addresses)
{
impl_->setForwardAddresses(addresses, io_);
impl_->setForwardAddresses(addresses, dnss_);
}
bool
......@@ -541,7 +541,7 @@ Recursor::getForwardAddresses() const {
namespace {
void
setAddresses(IOService *service, const vector<addr_t>& addresses) {
setAddresses(DNSService *service, const vector<addr_t>& addresses) {
service->clearServers();
BOOST_FOREACH(const addr_t &address, addresses) {
service->addServer(address.second, address.first);
......@@ -553,7 +553,7 @@ setAddresses(IOService *service, const vector<addr_t>& addresses) {
void
Recursor::setListenAddresses(const vector<addr_t>& addresses) {
try {
setAddresses(io_, addresses);
setAddresses(dnss_, addresses);
impl_->listen_ = addresses;
}
catch (const exception& e) {
......@@ -565,7 +565,7 @@ Recursor::setListenAddresses(const vector<addr_t>& addresses) {
* and let boss start us again.
*/
try {
setAddresses(io_, impl_->listen_);
setAddresses(dnss_, impl_->listen_);
}
catch (const exception& e2) {
cerr << "[b10-recurse] Unable to recover from error: " << e.what()
......
......@@ -63,7 +63,7 @@ private:
class RecursorTest : public ::testing::Test {
protected:
RecursorTest() : server(*DEFAULT_REMOTE_ADDRESS),
RecursorTest() : server(),
request_message(Message::RENDER),
parse_message(new Message(Message::PARSE)),
default_qid(0x1035), opcode(Opcode(Opcode::QUERY())),
......@@ -331,12 +331,13 @@ TEST_F(RecursorTest, notifyFail) {
class RecursorConfig : public ::testing::Test {
public:
IOService service;
IOService ios;
DNSService dnss;
Recursor server;
RecursorConfig() :
service(NULL, NULL, NULL)
dnss(ios, NULL, NULL, NULL)
{
server.setIOService(service);
server.setDNSService(dnss);
}
void invalidTest(const string &JOSN);
};
......
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