summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-03 14:43:59 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-03 14:43:59 +0000
commit5405f7927e559304d2a7b653dd828668fd67f085 (patch)
treebdd30533a09eb5a6f3d09b88bef829880e83903b /src
parentb7d632aa9a54a6eb708e44c25176be1844137dee (diff)
Add some commenting
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4670 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/dns.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dns.cpp b/src/dns.cpp
index e9b863ea3..813c33030 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -202,14 +202,14 @@ int DNSRequest::SendRequests(const DNSHeader *header, const int length, QueryTyp
/* Add a query with a predefined header, and allocate an ID for it. */
DNSRequest* DNS::AddQuery(DNSHeader *header, int &id)
{
+ /* Are there already the max number of requests on the go? */
if (requests.size() == DNS::MAX_REQUEST_ID + 1)
return NULL;
+ /* Create an id */
id = this->PRNG() & DNS::MAX_REQUEST_ID;
- /* This id is already 'in flight', pick another.
- * -- Thanks jilles
- */
+ /* If this id is already 'in flight', pick another. */
while (requests.find(id) != requests.end())
id = this->PRNG() & DNS::MAX_REQUEST_ID;