* Lock remaining m_rpcHandlers use since these accesses are not guaranteed to be thread safe

0.6.3-post-fixes
Justin Clarke Casey 2009-02-12 18:54:48 +00:00
parent 8ed9c3b8cd
commit 6db1f3c6a6
1 changed files with 8 additions and 2 deletions

View File

@ -605,9 +605,15 @@ namespace OpenSim.Framework.Servers
{ {
xmlRprcRequest.Params.Add(request.RemoteIPEndPoint); // Param[1] xmlRprcRequest.Params.Add(request.RemoteIPEndPoint); // Param[1]
XmlRpcResponse xmlRpcResponse; XmlRpcResponse xmlRpcResponse;
XmlRpcMethod method; 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] xmlRprcRequest.Params.Add(request.Url); // Param[2]