diff options
| author | 2006-08-03 14:43:59 +0000 | |
|---|---|---|
| committer | 2006-08-03 14:43:59 +0000 | |
| commit | 5405f7927e559304d2a7b653dd828668fd67f085 (patch) | |
| tree | bdd30533a09eb5a6f3d09b88bef829880e83903b /src/dns.cpp | |
| parent | add erroring if there are already 65536 id's in transit (diff) | |
| download | inspircd++-5405f7927e559304d2a7b653dd828668fd67f085.tar.gz inspircd++-5405f7927e559304d2a7b653dd828668fd67f085.tar.bz2 inspircd++-5405f7927e559304d2a7b653dd828668fd67f085.zip | |
Add some commenting
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4670 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/dns.cpp')
| -rw-r--r-- | src/dns.cpp | 6 |
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; |
