diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-01 21:35:07 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-01 21:35:07 +0000 |
commit | a5c9214743e76bd8bee1cb5f4d0d6dc3d1171c58 (patch) | |
tree | 2a520b22f9a7423924b4ad776b747fd9ba198ae9 /src/inspsocket.cpp | |
parent | cf2836550f864e162923b8db82d1758b7fb77175 (diff) |
Removed threaded dns (it might make a comeback some day, but as it stands its incompatible with the new OO resolver)
Migrated to new OO resolver, removed as much firedns craq as is safe to do so, operates over one file descriptor now and keyed against request id.
The only way to use the system is via class Resolver (so i'll need to migrate the rest of the ircd to use it)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4622 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspsocket.cpp')
-rw-r--r-- | src/inspsocket.cpp | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index d6b836c4d..99ef731c6 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -103,8 +103,9 @@ InspSocket::InspSocket(const std::string &ahost, int aport, bool listening, unsi { log(DEBUG,"Attempting to resolve %s",this->host); /* Its not an ip, spawn the resolver */ - this->dns.SetNS(std::string(Config->DNSServer)); - this->dns.ForwardLookupWithFD(host,fd); + + /* TODO: Implement resolver with new Resolver class */ + timeout_end = time(NULL) + maxtime; timeout = false; this->state = I_RESOLVING; @@ -149,28 +150,7 @@ void InspSocket::SetQueues(int nfd) bool InspSocket::DoResolve() { log(DEBUG,"In DoResolve(), trying to resolve IP"); - if (this->dns.HasResult()) - { - log(DEBUG,"Socket has result"); - std::string res_ip = dns.GetResultIP(); - if (res_ip != "") - { - log(DEBUG,"Socket result set to %s",res_ip.c_str()); - strlcpy(this->IP,res_ip.c_str(),MAXBUF); - socket_ref[this->fd] = NULL; - } - else - { - log(DEBUG,"Socket DNS failure"); - this->Close(); - this->state = I_ERROR; - this->OnError(I_ERR_RESOLVE); - this->fd = -1; - this->ClosePending = true; - return false; - } - return this->DoConnect(); - } + log(DEBUG,"No result for socket yet!"); return true; } |