From 6a02ac634b99468a0df62cdf43254020488fcb7b Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 17 Jul 2016 11:39:38 +0100 Subject: identify contexts by ID now avaiable ( pipeline serialization) --- .../Framework/Servers/HttpServer/PollServiceHttpRequest.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'OpenSim/Framework/Servers/HttpServer') diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs index 0e4a941..9083e12 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceHttpRequest.cs @@ -47,8 +47,10 @@ namespace OpenSim.Framework.Servers.HttpServer public readonly UUID RequestID; public int contextHash; +/* private void GenContextHash() { + Random rnd = new Random(); contextHash = 0; if (Request.Headers["remote_addr"] != null) @@ -62,8 +64,9 @@ namespace OpenSim.Framework.Servers.HttpServer } else contextHash += rnd.Next() & 0xffff; - } + } +*/ public PollServiceHttpRequest( PollServiceEventArgs pPollServiceArgs, IHttpClientContext pHttpContext, IHttpRequest pRequest) { @@ -72,7 +75,8 @@ namespace OpenSim.Framework.Servers.HttpServer Request = pRequest; RequestTime = System.Environment.TickCount; RequestID = UUID.Random(); - GenContextHash(); +// GenContextHash(); + contextHash = HttpContext.contextID; } internal void DoHTTPGruntWork(BaseHttpServer server, Hashtable responsedata) @@ -132,8 +136,9 @@ namespace OpenSim.Framework.Servers.HttpServer { if (b1.contextHash != b2.contextHash) return false; - bool b = Object.ReferenceEquals(b1.HttpContext, b2.HttpContext); - return b; +// bool b = Object.ReferenceEquals(b1.HttpContext, b2.HttpContext); +// return b; + return true; } public int GetHashCode(PollServiceHttpRequest b2) -- cgit v1.1