mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
If calls to UserAgentServiceConnector fail then throw an exception. This lets the caller decide whether to discard the error or not.
This is Oren Hurvitz's 0001 patch from http://opensimulator.org/mantis/view.php?id=6956 but I ended up doing some tweaking to resolve patch application issues.
This commit is contained in:
@@ -282,7 +282,17 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||
string uasURL = circuit.ServiceURLs["HomeURI"].ToString();
|
||||
m_log.DebugFormat("[HG MESSAGE TRANSFER]: getting UUI of user {0} from {1}", toAgent, uasURL);
|
||||
UserAgentServiceConnector uasConn = new UserAgentServiceConnector(uasURL);
|
||||
return uasConn.GetUUI(fromAgent, toAgent);
|
||||
|
||||
string agentUUI = string.Empty;
|
||||
try
|
||||
{
|
||||
agentUUI = uasConn.GetUUI(fromAgent, toAgent);
|
||||
}
|
||||
catch (Exception e) {
|
||||
m_log.Warn("[HG MESSAGE TRANSFER]: GetUUI call failed ", e);
|
||||
}
|
||||
|
||||
return agentUUI;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1164,7 +1164,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
|
||||
|
||||
UserAgentServiceConnector uConn = new UserAgentServiceConnector(home_url);
|
||||
|
||||
Dictionary<string, object> account = uConn.GetUserInfo(userID);
|
||||
Dictionary<string, object> account;
|
||||
try
|
||||
{
|
||||
account = uConn.GetUserInfo(userID);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Warn("[PROFILES]: GetUserInfo call failed ", e);
|
||||
account = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
if (account.Count > 0)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
@@ -462,7 +462,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
|
||||
IUserAgentService userAgentService = new UserAgentServiceConnector(aCircuit.ServiceURLs["HomeURI"].ToString());
|
||||
Vector3 position = Vector3.UnitY, lookAt = Vector3.UnitY;
|
||||
GridRegion finalDestination = userAgentService.GetHomeRegion(aCircuit.AgentID, out position, out lookAt);
|
||||
|
||||
GridRegion finalDestination = null;
|
||||
try
|
||||
{
|
||||
finalDestination = userAgentService.GetHomeRegion(aCircuit.AgentID, out position, out lookAt);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Warn("[HG ENTITY TRANSFER MODULE]: GetHomeRegion call failed ", e);
|
||||
}
|
||||
|
||||
if (finalDestination == null)
|
||||
{
|
||||
client.SendTeleportFailed("Your home region could not be found");
|
||||
|
||||
@@ -130,7 +130,17 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||
}
|
||||
|
||||
UserAgentServiceConnector uasConn = new UserAgentServiceConnector(uriStr);
|
||||
UUID userID = uasConn.GetUUID(names[0], names[1]);
|
||||
|
||||
UUID userID = UUID.Zero;
|
||||
try
|
||||
{
|
||||
userID = uasConn.GetUUID(names[0], names[1]);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Warn("[USER MANAGEMENT MODULE]: GetUUID call failed ", e);
|
||||
}
|
||||
|
||||
if (!userID.Equals(UUID.Zero))
|
||||
{
|
||||
UserData ud = new UserData();
|
||||
|
||||
@@ -473,7 +473,16 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||
// serverType, userdata.HomeURL, userID);
|
||||
|
||||
UserAgentServiceConnector uConn = new UserAgentServiceConnector(userdata.HomeURL);
|
||||
userdata.ServerURLs = uConn.GetServerURLs(userID);
|
||||
try
|
||||
{
|
||||
userdata.ServerURLs = uConn.GetServerURLs(userID);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Warn("[USER MANAGEMENT MODULE]: GetServerURLs call failed ", e);
|
||||
userdata.ServerURLs = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
if (userdata.ServerURLs != null && userdata.ServerURLs.ContainsKey(serverType) && userdata.ServerURLs[serverType] != null)
|
||||
return userdata.ServerURLs[serverType].ToString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user