Commit a039907d authored by Jelte Jansen's avatar Jelte Jansen
Browse files

some trivial style issues

mostly whitespace, one comment update and two lines of dead code
parent 3c337419
......@@ -76,7 +76,7 @@ public:
void querySetup(DNSService& dnss) {
assert(!rec_query_); // queryShutdown must be called first
dlog("Query setup");
rec_query_ = new RecursiveQuery(dnss, upstream_,upstream_root_);
rec_query_ = new RecursiveQuery(dnss, upstream_, upstream_root_);
}
void queryShutdown() {
......@@ -105,7 +105,7 @@ public:
}
void setRootAddresses(const vector<addr_t>& upstream_root,
DNSService *dnss)
DNSService *dnss)
{
queryShutdown();
upstream_root_ = upstream_root;
......
......@@ -122,7 +122,8 @@ public:
* and port pair).
*/
void setRootAddresses(const std::vector<std::pair<std::string,
uint16_t> >& addresses);
uint16_t> >& addresses);
/**
* \short Get list of root addresses.
*
......
......@@ -111,8 +111,6 @@ TEST_F(ResolverConfig, rootAddressConfig) {
ASSERT_EQ(1, server.getRootAddresses().size());
EXPECT_EQ("192.0.2.1", server.getRootAddresses()[0].first);
EXPECT_EQ(53, server.getRootAddresses()[0].second);
//EXPECT_EQ("199.7.83.42", server.getRootAddresses()[0].first);
//EXPECT_EQ(53, server.getRootAddresses()[0].second);
// And then remove all addresses
config = Element::fromJSON("{"
......
......@@ -541,7 +541,7 @@ public:
/// \param upstream Addresses and ports of the upstream servers
/// to forward queries to.
/// \param upstream_root Addresses and ports of the root servers
/// to forward queries to.
/// to use when resolving.
/// \param timeout How long to timeout the query, in ms
/// -1 means never timeout (but do not use that).
/// TODO: This should be computed somehow dynamically in future
......
......@@ -647,15 +647,17 @@ singleAddress(const string &address, uint16_t port) {
TEST_F(ASIOLinkTest, recursiveSetupV4) {
setDNSService(true, false);
uint16_t port = boost::lexical_cast<uint16_t>(TEST_CLIENT_PORT);
EXPECT_NO_THROW(RecursiveQuery(*dns_service_, singleAddress(TEST_IPV4_ADDR,
port),singleAddress(TEST_IPV4_ADDR,port)));
EXPECT_NO_THROW(RecursiveQuery(*dns_service_,
singleAddress(TEST_IPV4_ADDR, port),
singleAddress(TEST_IPV4_ADDR, port)));
}
TEST_F(ASIOLinkTest, recursiveSetupV6) {
setDNSService(false, true);
uint16_t port = boost::lexical_cast<uint16_t>(TEST_CLIENT_PORT);
EXPECT_NO_THROW(RecursiveQuery(*dns_service_, singleAddress(TEST_IPV6_ADDR,
port),singleAddress(TEST_IPV6_ADDR,port)));
EXPECT_NO_THROW(RecursiveQuery(*dns_service_,
singleAddress(TEST_IPV6_ADDR, port),
singleAddress(TEST_IPV6_ADDR,port)));
}
// XXX:
......@@ -671,8 +673,9 @@ TEST_F(ASIOLinkTest, forwarderSend) {
uint16_t port = boost::lexical_cast<uint16_t>(TEST_CLIENT_PORT);
MockServer server(*io_service_);
RecursiveQuery rq(*dns_service_, singleAddress(TEST_IPV4_ADDR, port),
singleAddress(TEST_IPV4_ADDR, port));
RecursiveQuery rq(*dns_service_,
singleAddress(TEST_IPV4_ADDR, port),
singleAddress(TEST_IPV4_ADDR, port));
Question q(Name("example.com"), RRClass::IN(), RRType::TXT());
OutputBufferPtr buffer(new OutputBuffer(0));
......@@ -718,8 +721,10 @@ TEST_F(ASIOLinkTest, recursiveTimeout) {
// Do the answer
const uint16_t port = boost::lexical_cast<uint16_t>(TEST_CLIENT_PORT);
RecursiveQuery query(*dns_service_, singleAddress(TEST_IPV4_ADDR, port),
singleAddress(TEST_IPV4_ADDR, port),10, 2);
RecursiveQuery query(*dns_service_,
singleAddress(TEST_IPV4_ADDR, port),
singleAddress(TEST_IPV4_ADDR, port),
10, 2);
Question question(Name("example.net"), RRClass::IN(), RRType::A());
OutputBufferPtr buffer(new OutputBuffer(0));
MessagePtr answer(new Message(Message::RENDER));
......
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