Commit 3531995a authored by Michal Vaner's avatar Michal Vaner

Minor fixes

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac408@3734 e5f2f494-b856-4b98-b285-d166d9295462
parent ea18184f
......@@ -177,7 +177,7 @@ class NameserverEntry::ResolverCallback : public ResolverInterface::Callback {
family_(family),
type_(type)
{ }
virtual void success(shared_ptr<AbstractRRset> response) {
virtual void success(const shared_ptr<AbstractRRset>& response) {
time_t now = time(NULL);
Lock lock(entry_->mutex_);
......
......@@ -46,7 +46,8 @@ class ResolverInterface {
class Callback {
public:
/// \short Some data arrived.
virtual void success(boost::shared_ptr<isc::dns::AbstractRRset>
virtual void success(
const boost::shared_ptr<isc::dns::AbstractRRset>&
response) = 0;
/**
* \short No data available.
......@@ -67,8 +68,8 @@ class ResolverInterface {
* \param question What to ask. The resolver will decide who.
* \param callback What should happen when the answer is ready.
*/
virtual void resolve(isc::dns::QuestionPtr question,
CallbackPtr callback) = 0;
virtual void resolve(const isc::dns::QuestionPtr& question,
const CallbackPtr& callback) = 0;
/// \short Virtual destructor, so descendants are properly cleaned up
virtual ~ ResolverInterface() {}
};
......
......@@ -282,7 +282,7 @@ TEST_F(NameserverAddressStoreTest, zoneWithoutNameservers) {
getCallback());
// There should be no questions, because there's nothing to ask
EXPECT_EQ(0, resolver_->requests.size());
// And there should be one „unreachable“ answer for the query
// And there should be one "unreachable" answer for the query
ASSERT_EQ(1, NSASCallback::results.size());
EXPECT_FALSE(NSASCallback::results[0].first);
}
......
......@@ -231,7 +231,7 @@ class TestResolver : public isc::nsas::ResolverInterface {
public:
typedef pair<QuestionPtr, CallbackPtr> Request;
vector<Request> requests;
virtual void resolve(QuestionPtr q, CallbackPtr c) {
virtual void resolve(const QuestionPtr& q, const CallbackPtr& c) {
PresetAnswers::iterator it(answers_.find(*q));
if (it == answers_.end()) {
requests.push_back(Request(q, c));
......
......@@ -68,7 +68,7 @@ class ZoneEntry::ResolverCallback : public ResolverInterface::Callback {
ResolverCallback(shared_ptr<ZoneEntry> entry) :
entry_(entry)
{ }
virtual void success(shared_ptr<AbstractRRset> answer) {
virtual void success(const shared_ptr<AbstractRRset>& answer) {
shared_ptr<Lock> lock(new Lock(entry_->mutex_));
RdataIteratorPtr iterator(answer->getRdataIterator());
iterator->first();
......
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