From d2a9c07bd45ab0c97b49364faf80588ff5558f8f Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 29 Dec 2005 00:31:45 +0000 Subject: Fixed an extremely n00bish mistake involving referencing a global copy of ServerEngine when we now use one local to class InspIRCd (everyone point and laugh at Brain) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2692 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/dns.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/dns.cpp') diff --git a/src/dns.cpp b/src/dns.cpp index efb690dc2..990c2170e 100644 --- a/src/dns.cpp +++ b/src/dns.cpp @@ -155,6 +155,9 @@ void dns_empty_header(unsigned char *output, const s_header *header, const int l } void dns_close(int fd) { /* close query */ +#ifndef THREADED_DNS + ServerInstance->SE->DelFd(fd); +#endif log(DEBUG,"DNS: dns_close on fd %d",fd); if (fd == lastcreate) { wantclose = 1; @@ -717,9 +720,6 @@ std::string DNS::GetResult() { log(DEBUG,"DNS: GetResult()"); result = dns_getresult(this->myfd); -#ifndef THREADED_DNS - ServerInstance->SE->DelFd(this->myfd); -#endif if (result) { ServerInstance->stats->statsDnsGood++; dns_close(this->myfd); @@ -741,9 +741,6 @@ std::string DNS::GetResultIP() result = dns_getresult(this->myfd); if (this->myfd != -1) { -#ifndef THREADED_DNS - ServerInstance->SE->DelFd(this->myfd); -#endif dns_close(this->myfd); } if (result) -- cgit v1.2.3