mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +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:
@@ -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