From 3bb5b5c0f1a7b6a27783e7f43bb9ebe665f6ade1 Mon Sep 17 00:00:00 2001 From: Guilherme Maciel Ferreira Date: Thu, 23 Feb 2012 00:50:02 -0200 Subject: [PATCH] Created a HostAddressList type as an alias to the STL list of HostAddresses. --- src/dns/dnsresolver.cpp | 4 ++-- src/dns/dnsresolver.h | 5 ++--- src/dns/hostaddress.h | 7 +++++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/dns/dnsresolver.cpp b/src/dns/dnsresolver.cpp index 219c35c..40b1477 100644 --- a/src/dns/dnsresolver.cpp +++ b/src/dns/dnsresolver.cpp @@ -236,7 +236,7 @@ rr_list_t DnsResolver::fill_answers_list( void DnsResolver::fill_resolved_ip_list( const rr_list_t& answers_list, - list *resolved_host_address_list + HostAddressList *resolved_host_address_list ) const { BOOST_ASSERT( 1 <= answers_list.size() ); @@ -268,7 +268,7 @@ void DnsResolver::fill_resolved_ip_list( void DnsResolver::append_resolved_ipv4( const shared_ptr resource_record, - list *resolved_host_address_list + HostAddressList *resolved_host_address_list ) const { BOOST_ASSERT( resource_record->rtype() == boost::net::dns::type_a ); diff --git a/src/dns/dnsresolver.h b/src/dns/dnsresolver.h index 1c3dd0a..95a2eaf 100644 --- a/src/dns/dnsresolver.h +++ b/src/dns/dnsresolver.h @@ -21,11 +21,10 @@ on this file might be covered by the GNU General Public License. #define DNS_RESOLVER_H #include -#include #include -class HostAddress; +#include "dns/hostaddress.h" //----------------------------------------------------------------------------- // DnsResolver @@ -66,7 +65,7 @@ private: private: /// The list of IPs available to the host DNS. - std::list ResolvedHostAddressList; + HostAddressList ResolvedHostAddressList; /// The DNS of the host. const std::string HostDnsAddress; /// The address of the server which can resolve the host address. diff --git a/src/dns/hostaddress.h b/src/dns/hostaddress.h index c1da3bf..603630e 100644 --- a/src/dns/hostaddress.h +++ b/src/dns/hostaddress.h @@ -22,6 +22,7 @@ on this file might be covered by the GNU General Public License. #include +#include #include #include "dns/timetolive.h" @@ -54,4 +55,10 @@ private: }; +//----------------------------------------------------------------------------- +// HostAddressList +//----------------------------------------------------------------------------- + +typedef std::list HostAddressList; + #endif // HOST_ADDRESS_H -- 1.7.1