* Locked some RemoteAdmin methods due to racing condition bad behavior.

* Methods locked: CreateRegion, DeleteRegion, CreateUser, CreateUserMethodEmail,
UpdateUserAccountMethod, LoadOARMethod, LoadXMLMethod
* An example of bad behavior was multiple region creation where same UUID and
grid location was possible, by running multiple XMLRPC threads.

From: Arthur Rodrigo S Valadares <arthursv@linux.vnet.ibm.com>
0.6.1-post-fixes
Sean Dague 2008-12-03 19:19:46 +00:00
parent b2ab15ba34
commit b337088997
1 changed files with 458 additions and 443 deletions

View File

@ -380,6 +380,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
lock(this) {
int m_regionLimit = m_config.GetInt("region_limit", 0);
try {
@ -537,9 +538,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
response.Value = responseData;
}
return response;
}
}
/// <summary>
/// Delete a new region.
@ -573,6 +574,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
lock(this) {
try {
Hashtable requestData = (Hashtable) request.Params[0];
checkStringParameters(request, new string[] {"password", "region_name"});
@ -601,6 +603,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
}
return response;
}
}
/// <summary>
@ -645,6 +649,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
lock(this) {
try
{
Hashtable requestData = (Hashtable) request.Params[0];
@ -695,8 +700,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
response.Value = responseData;
}
return response;
}
}
/// <summary>
@ -743,6 +749,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
lock(this) {
try
{
Hashtable requestData = (Hashtable)request.Params[0];
@ -793,8 +800,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
response.Value = responseData;
}
return response;
}
}
/// <summary>
@ -909,6 +917,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
lock(this) {
try
{
Hashtable requestData = (Hashtable) request.Params[0];
@ -991,6 +1000,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
response.Value = responseData;
}
}
return response;
}
@ -1033,6 +1043,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
lock(this) {
try
{
Hashtable requestData = (Hashtable) request.Params[0];
@ -1084,6 +1095,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
return response;
}
}
/// <summary>
/// Save a region to an OAR file
@ -1182,6 +1194,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable();
lock(this) {
try
{
Hashtable requestData = (Hashtable) request.Params[0];
@ -1255,6 +1269,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
return response;
}
}
public XmlRpcResponse XmlRpcSaveXMLMethod(XmlRpcRequest request)