diff --git a/ChangeLog b/ChangeLog index 1aebb81..159c6a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-08-18 Josh Tauberer + + * src/Mono.WebServer/BaseRequestBroker.cs: Correct a mistake + in my previous patch: checking for wrap-around on requests_served + counter, since we bitmask it 0x7FFF, wrap-around occurs at 0x8000. + 2007-08-16 Wade Berrier * configure.in: version bump -> 1.2.5 diff --git a/src/Mono.WebServer/BaseRequestBroker.cs b/src/Mono.WebServer/BaseRequestBroker.cs index fd0772f..9acd0db 100644 --- a/src/Mono.WebServer/BaseRequestBroker.cs +++ b/src/Mono.WebServer/BaseRequestBroker.cs @@ -183,8 +183,8 @@ namespace Mono.WebServer requests_served++; // increment to 1 before putting into request_ids // so that the 0 id is reserved for slot not used - if (requests_served == 0) // and check for wrap-around for the above - requests_served++; // condition + if (requests_served == 0x8000) // and check for wrap-around for the above + requests_served = 1; // making sure we don't exceed 0x7FFF or go negative requests_count++; if (requests_count >= reqlen)