summaryrefslogtreecommitdiff
path: root/src/dns.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-29 00:31:45 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-29 00:31:45 +0000
commitd2a9c07bd45ab0c97b49364faf80588ff5558f8f (patch)
treec796b8250999d408a4b30b21281d7da5baaf8be1 /src/dns.cpp
parent0bf908e49c957ce35ac194a0c9b739f22d76182e (diff)
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
Diffstat (limited to 'src/dns.cpp')
-rw-r--r--src/dns.cpp9
1 files changed, 3 insertions, 6 deletions
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)