]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/dns.cpp
detect if the process has an interactive session (if its started as a service, the...
[user/henk/code/inspircd.git] / src / dns.cpp
index 2e393de537f12954862bf5b55e3d57e222b52389..dea55c6c15ef7467c8860e0f745e580738f6ba6b 100644 (file)
@@ -11,7 +11,7 @@
  * ---------------------------------------------------
  */
 
-/* $Core: libIRCDasyncdns */
+/* $Core */
 
 /*
 dns.cpp - Nonblocking DNS functions.
@@ -934,7 +934,6 @@ DNS::~DNS()
        ServerInstance->SE->Shutdown(this, 2);
        ServerInstance->SE->Close(this);
        ServerInstance->Timers->DelTimer(this->PruneTimer);
-       delete this->PruneTimer;
 }
 
 CachedQuery* DNS::GetCache(const std::string &source)
@@ -1170,8 +1169,8 @@ unsigned long DNS::PRNG()
        timeval n;
        serverstats* s = ServerInstance->stats;
        gettimeofday(&n,NULL);
-       val = (n.tv_usec ^ getpid() ^ geteuid() ^ (this->currid++)) ^ s->statsAccept + n.tv_sec;
-       val = val + s->statsCollisions ^ s->statsDnsGood - s->statsDnsBad;
+       val = (n.tv_usec ^ (getpid() ^ geteuid()) ^ ((this->currid++)) ^ s->statsAccept) + n.tv_sec;
+       val = val + (s->statsCollisions ^ s->statsDnsGood) - s->statsDnsBad;
        val += (s->statsConnects ^ (unsigned long)s->statsSent ^ (unsigned long)s->statsRecv) - ServerInstance->Config->ports.size();
        return val;
 }