* Fixed UserServer crash when it's passed 00000000000000000000000000 as the UUID.
* It turns out that by proxy, this means that you won't have to look up people's UUID anymore in grid mode, If the UUID is LLUUID.Zero, it tries to look up avatar by name.afrisby
parent
c4987f14e2
commit
13f85c9d82
|
@ -156,7 +156,16 @@ namespace OpenSim.Grid.UserServer
|
||||||
UserProfileData userProfile;
|
UserProfileData userProfile;
|
||||||
if (requestData.Contains("avatar_name"))
|
if (requestData.Contains("avatar_name"))
|
||||||
{
|
{
|
||||||
userProfile = GetUserProfile((string) requestData["avatar_name"]);
|
string query = (string)requestData["avatar_name"];
|
||||||
|
|
||||||
|
System.Text.RegularExpressions.Regex objAlphaNumericPattern = new System.Text.RegularExpressions.Regex("[^a-zA-Z0-9]");
|
||||||
|
|
||||||
|
string[] querysplit;
|
||||||
|
querysplit = query.Split(' ');
|
||||||
|
|
||||||
|
if (querysplit.Length == 2)
|
||||||
|
{
|
||||||
|
userProfile = GetUserProfile(querysplit[0],querysplit[1]);
|
||||||
if (userProfile == null)
|
if (userProfile == null)
|
||||||
{
|
{
|
||||||
return CreateUnknownUserErrorResponse();
|
return CreateUnknownUserErrorResponse();
|
||||||
|
@ -166,6 +175,11 @@ namespace OpenSim.Grid.UserServer
|
||||||
{
|
{
|
||||||
return CreateUnknownUserErrorResponse();
|
return CreateUnknownUserErrorResponse();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return CreateUnknownUserErrorResponse();
|
||||||
|
}
|
||||||
|
|
||||||
return ProfileToXmlRPCResponse(userProfile);
|
return ProfileToXmlRPCResponse(userProfile);
|
||||||
}
|
}
|
||||||
|
@ -179,7 +193,18 @@ namespace OpenSim.Grid.UserServer
|
||||||
//CFK: Console.WriteLine("METHOD BY UUID CALLED");
|
//CFK: Console.WriteLine("METHOD BY UUID CALLED");
|
||||||
if (requestData.Contains("avatar_uuid"))
|
if (requestData.Contains("avatar_uuid"))
|
||||||
{
|
{
|
||||||
userProfile = GetUserProfile((LLUUID) (string) requestData["avatar_uuid"]);
|
LLUUID guess = new LLUUID();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
guess = new LLUUID((string)requestData["avatar_uuid"]);
|
||||||
|
|
||||||
|
userProfile = GetUserProfile(guess);
|
||||||
|
}
|
||||||
|
catch (System.FormatException)
|
||||||
|
{
|
||||||
|
return CreateUnknownUserErrorResponse();
|
||||||
|
}
|
||||||
|
|
||||||
if (userProfile == null)
|
if (userProfile == null)
|
||||||
{
|
{
|
||||||
return CreateUnknownUserErrorResponse();
|
return CreateUnknownUserErrorResponse();
|
||||||
|
|
Loading…
Reference in New Issue