From 656e19351668cb5ada005d4e9e7e6d1f787990e2 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 2 Feb 2006 16:34:34 +0000 Subject: *UNTESTED DO NOT USE YET* - async dns for InspSocket as test - removing requirement on nss_dns.so.1 git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3017 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/dns.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/dns.cpp') diff --git a/src/dns.cpp b/src/dns.cpp index f6bba28da..67c309f41 100644 --- a/src/dns.cpp +++ b/src/dns.cpp @@ -735,6 +735,20 @@ bool DNS::ForwardLookup(std::string host) return true; } +bool DNS::ForwardLookupWithFD(std::string host, int &fd) +{ + ServerInstance->stats->statsDns++; + this->myfd = dns_getip4(host.c_str()); + fd = this->myfd; + if (this->myfd == -1) + { + + } + log(DEBUG,"DNS: ForwardLookupWithFD, fd=%d",this->myfd); + ServerInstance->SE->AddFd(this->myfd,true,X_ESTAB_MODULE); + return true; +} + bool DNS::HasResult(int fd) { return (fd == this->myfd); -- cgit v1.3.1-10-gc9f91