fixed 2 bugs and made clearer that Long-term timer in DnsResolver is not affected...
[pingcheck] / src / dns / dnsresolver.h
index 895f6b4..5caf9c7 100644 (file)
@@ -65,7 +65,8 @@ public:
     bool have_up_to_date_ip();
     int get_resolved_ip_count();
     void cancel_resolve();
-    bool is_resolving();
+    bool is_resolving() const;
+    bool is_waiting_to_resolve() const;
 
 // implementation of ResolverBase::async_resolve
 protected:
@@ -83,7 +84,7 @@ private:
                                 const int cname_count);
     void schedule_retry();
     void finalize_resolve(const bool success, const int cname_count=0);
-    void stop_trying();
+    void stop_trying(const bool was_success);
     void wait_timer_timeout_handler(const boost::system::error_code &error);
     void gather_results( const boost::net::dns::rr_list_t *rr_list,
                          std::vector<host_addr_pair> *result_ips,
@@ -108,6 +109,7 @@ private:
     boost::uuids::random_generator RandomIdGenerator;
     uint16_t RequestId;
     bool OperationCancelled;
+    bool LongermTimerIsActive;
 };
 
 #endif