summaryrefslogtreecommitdiff
path: root/src/AbstractCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-02-08 23:05:40 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-02-08 23:05:40 +0900
commitf0682a98c0c22a9ef1a47e54d19244c9b4b9d208 (patch)
treeed674060632036481ccb2a0dd8ef3a68b06b7b70 /src/AbstractCommand.cc
parentcf546810e464e0e53bfe5c6f710f768a5fafcf68 (diff)
Added --async-dns-server option.
This option accepts comma separated list of DNS server address used in asynchronous DNS resolver. Usually asynchronous DNS resolver reads DNS server addresses from /etc/resolv.conf. When this option is used, it uses DNS servers specified in this option instead of ones in /etc/resolv.conf. You can specify both IPv4 and IPv6 address. This option is useful when the system does not have /etc/resolv.conf and user does not have the permission to create it.
Diffstat (limited to 'src/AbstractCommand.cc')
-rw-r--r--src/AbstractCommand.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/AbstractCommand.cc b/src/AbstractCommand.cc
index de89fec9..04c36077 100644
--- a/src/AbstractCommand.cc
+++ b/src/AbstractCommand.cc
@@ -650,7 +650,8 @@ void AbstractCommand::initAsyncNameResolver(const std::string& hostname)
} else {
family = AF_INET;
}
- asyncNameResolver_.reset(new AsyncNameResolver(family));
+ asyncNameResolver_.reset
+ (new AsyncNameResolver(family, e_->getAsyncDNSServers()));
A2_LOG_INFO(fmt(MSG_RESOLVING_HOSTNAME,
getCuid(),
hostname.c_str()));