AuthSrv* server_;
};
-AuthSrv::AuthSrv(const bool use_cache, AbstractXfroutClient& xfrout_client) :
- impl_(new AuthSrvImpl(use_cache, xfrout_client)),
- checkin_(new ConfigChecker(this)),
- dns_lookup_(new MessageLookup(this)),
- dns_answer_(new MessageAnswer(this))
-{}
+AuthSrv::AuthSrv(const bool use_cache, AbstractXfroutClient& xfrout_client)
+{
+ impl_ = new AuthSrvImpl(use_cache, xfrout_client);
+ checkin_ = new ConfigChecker(this);
+ dns_lookup_ = new MessageLookup(this);
+ dns_answer_ = new MessageAnswer(this);
+}
void
AuthSrv::stop() {
Resolver::Resolver() :
impl_(new ResolverImpl()),
dnss_(NULL),
- checkin_(new ConfigCheck(this)),
- dns_lookup_(new MessageLookup(this)),
+ checkin_(NULL),
+ dns_lookup_(NULL),
dns_answer_(new MessageAnswer),
nsas_(NULL),
cache_(NULL),
configured_(false)
-{}
+{
+ // Operations referring to "this" must be done in the constructor body
+ // (some compilers will issue warnings if "this" is referred to in the
+ // initialization list).
+ checkin_ = new ConfigCheck(this);
+ dns_lookup_ = new MessageLookup(this);
+}
Resolver::~Resolver() {
delete impl_;
///
/// This is intentionally defined as \c protected as this base class
/// should never be instantiated (except as part of a derived class).
- DNSLookup() : self_(this) {}
+ DNSLookup() {
+ self_ = this;
+ }
public:
/// \brief The destructor
virtual ~DNSLookup() {}
/// This is intentionally defined as \c protected, as this base class
/// should never be instantiated except as part of a derived class.
//@{
- DNSServer() : self_(this) {}
+ DNSServer() {
+ self_ = this;
+ }
public:
/// \brief The destructor
virtual ~DNSServer() {}
///
/// This is intentionally defined as \c protected as this base class
/// should never be instantiated (except as part of a derived class).
- SimpleCallback() : self_(this) {}
+ SimpleCallback() {
+ self_ = this;
+ }
public:
/// \brief The destructor
virtual ~SimpleCallback() {}
// This is only to support NULL nodes.
template <typename T>
RBNode<T>::RBNode() :
- parent_(this),
- left_(this),
- right_(this),
+ parent_(NULL),
+ left_(NULL),
+ right_(NULL),
color_(BLACK),
// dummy name, the value doesn't matter:
name_(isc::dns::Name::ROOT_NAME()),
- down_(this),
+ down_(NULL),
flags_(0)
{
+ // Some compilers object to use of "this" in initializer lists.
+ parent_ = this;
+ left_ = this;
+ right_ = this;
+ down_ = this;
}
template <typename T>
nsas_(nsas),
cache_(cache),
cur_zone_("."),
- nsas_callback_(new ResolverNSASCallback(this)),
+ nsas_callback_(),
nsas_callback_out_(false),
outstanding_events_(0),
rtt_recorder_(recorder)
{
+ // Set here to avoid using "this" in initializer list.
+ nsas_callback_.reset(new ResolverNSASCallback(this));
+
// Setup the timer to stop trying (lookup_timeout)
if (lookup_timeout >= 0) {
lookup_timer.expires_from_now(