From d06e02bc304bc53d5f7185ae3709a46b65d69a46 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 2 Aug 2006 21:46:22 +0000 Subject: Add back stats counters for dns total, good and bad git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4660 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/dns.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/dns.cpp b/src/dns.cpp index 652bd9838..2a71f71df 100644 --- a/src/dns.cpp +++ b/src/dns.cpp @@ -670,6 +670,8 @@ void DNS::MarshallReads(int fd) log(DEBUG,"Error available, id=%d",res.first); if (Classes[res.first]) { + if (ServerInstance && ServerInstance->stats) + ServerInstance->stats->statsDnsBad++; Classes[res.first]->OnError(RESOLVER_NXDOMAIN, res.second); delete Classes[res.first]; Classes[res.first] = NULL; @@ -682,11 +684,17 @@ void DNS::MarshallReads(int fd) /* Marshall the result to the correct class */ if (Classes[res.first]) { + if (ServerInstance && ServerInstance->stats) + ServerInstance->stats->statsDnsGood++; Classes[res.first]->OnLookupComplete(res.second); delete Classes[res.first]; Classes[res.first] = NULL; } } + + if (ServerInstance && ServerInstance->stats) + ServerInstance->stats->statsDns++; + } } } -- cgit v1.2.3