diff options
author | Adam <Adam@anope.org> | 2011-08-23 19:06:15 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-09-10 01:55:37 -0400 |
commit | b504791bad450dfc9d28faa8b2009f8eaef0f485 (patch) | |
tree | efd935358ade31dfb0987091d75864d7c3985443 /src/main.cpp | |
parent | d5749c11f3ad7288c9307e156f263a2223ecd1a1 (diff) |
Cleaned up the dns engine, and fixed sometimes parsing multiple answer queries incorrectly
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index b00a6ee6e..69a5fe38f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -183,8 +183,8 @@ static void Connect() if (!Config->LocalHost.empty()) UplinkSock->Bind(Config->LocalHost); FOREACH_MOD(I_OnPreServerConnect, OnPreServerConnect()); - DNSRecord req = DNSManager::BlockingQuery(u->host, u->ipv6 ? DNS_QUERY_AAAA : DNS_QUERY_A); - UplinkSock->Connect(req.result, u->port); + DNSQuery rep = DNSManager::BlockingQuery(u->host, u->ipv6 ? DNS_QUERY_AAAA : DNS_QUERY_A); + UplinkSock->Connect(!rep.answers.empty() ? rep.answers.front().rdata : u->host, u->port); } /*************************************************************************/ |