summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-02 21:46:22 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-02 21:46:22 +0000
commitd06e02bc304bc53d5f7185ae3709a46b65d69a46 (patch)
tree296cd6fd8881d3caa0e02392c29549aff7932dd0
parentbe9ffd24301fedb5aadb8657fe46bc0d52fa88db (diff)
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
-rw-r--r--src/dns.cpp8
1 files changed, 8 insertions, 0 deletions
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++;
+
}
}
}