From 6db1f3c6a6d34ba292bd509f1402fe4615bd173e Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 12 Feb 2009 18:54:48 +0000 Subject: * Lock remaining m_rpcHandlers use since these accesses are not guaranteed to be thread safe --- OpenSim/Framework/Servers/BaseHttpServer.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index e0cc697..d6f0630 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs @@ -605,9 +605,15 @@ namespace OpenSim.Framework.Servers { xmlRprcRequest.Params.Add(request.RemoteIPEndPoint); // Param[1] XmlRpcResponse xmlRpcResponse; - + XmlRpcMethod method; - if (m_rpcHandlers.TryGetValue(methodName, out method)) + bool methodWasFound; + lock (m_rpcHandlers) + { + methodWasFound = m_rpcHandlers.TryGetValue(methodName, out method); + } + + if (methodWasFound) { xmlRprcRequest.Params.Add(request.Url); // Param[2] -- cgit v1.1