X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fdnsqueue.cpp;h=975884796f7dd24f9963c58dfb98cc77b9257077;hb=fc9e00f49299cb3b402406b5f185d5f4af1e9780;hp=20118038b85c6bc988ba67f51f98dd4fa4e95727;hpb=0c63269d544170d497cc96b311027df4242f41c7;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/dnsqueue.cpp b/src/dnsqueue.cpp index 20118038b..975884796 100644 --- a/src/dnsqueue.cpp +++ b/src/dnsqueue.cpp @@ -14,41 +14,23 @@ * --------------------------------------------------- */ -using namespace std; - #include "inspircd_config.h" #include "inspircd.h" -#include "inspircd_io.h" +#include "configreader.h" #include #include #include #include -#include -#include #include -#ifdef GCC3 -#include -#else -#include -#endif -#include -#include -#include -#include #include "users.h" #include "globals.h" #include "inspstring.h" #include "dnsqueue.h" -#include -#include -#include -#include -#include -#include #include "dns.h" #include "helperfuncs.h" #include "hashcomp.h" #include "socketengine.h" +#include "socket.h" extern ServerConfig* Config; extern InspIRCd* ServerInstance; @@ -129,8 +111,8 @@ public: { if ((std::string((char*)inet_ntoa(usr->ip4)) == ip) && (hostname.length() < 65)) { - strlcpy(usr->host,hostname.c_str(),MAXBUF); - strlcpy(usr->dhost,hostname.c_str(),MAXBUF); + strlcpy(usr->host,hostname.c_str(),64); + strlcpy(usr->dhost,hostname.c_str(),64); /*address_cache::iterator address = addrcache.find(usr->ip4); if (address == addrcache.end()) { @@ -265,7 +247,7 @@ void dns_poll(int fdcheck) * from the socket engine, as dns.cpp tracks it * for us if we are in single-threaded country. */ - delete x; + DELETE(x); } } else @@ -273,7 +255,7 @@ void dns_poll(int fdcheck) /* its fd is dodgy, the dns code probably * bashed it due to error. Free the class. */ - delete x; + DELETE(x); } /* If we got down here, the dns lookup was valid, BUT, * its still in progress. Be patient, and wait for @@ -288,4 +270,3 @@ void dns_poll(int fdcheck) if (ServerInstance && ServerInstance->SE) ServerInstance->SE->DelFd(fdcheck); } -