summaryrefslogtreecommitdiff
path: root/src/dns.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-02 16:34:34 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-02 16:34:34 +0000
commit656e19351668cb5ada005d4e9e7e6d1f787990e2 (patch)
treec1673703a495d282fa8e99c0814cfeb4896c6b03 /src/dns.cpp
parentc49148019103154a0d70c408450d78775e989c9b (diff)
*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
Diffstat (limited to 'src/dns.cpp')
-rw-r--r--src/dns.cpp14
1 files changed, 14 insertions, 0 deletions
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);