From 5405f7927e559304d2a7b653dd828668fd67f085 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 3 Aug 2006 14:43:59 +0000 Subject: Add some commenting git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4670 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/dns.cpp | 6 +++--- 1 file 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; -- cgit v1.2.3