From a6ade495a906624a13647430e6e82cffda9aa9d0 Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Sat, 18 Aug 2007 20:47:28 +0000 Subject: [PATCH] 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. svn path=/trunk/xsp/; revision=84355 --- ChangeLog | 6 ++++++ src/Mono.WebServer/BaseRequestBroker.cs | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) 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)