* Temporary workaround for mantis 1568. If the avatar apperance factory now throws any exception, we will carry on with the default appearance rather than terminating the client login
parent
40f32a9271
commit
f69f696181
|
@ -232,17 +232,17 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
IList parameters = new ArrayList();
|
IList parameters = new ArrayList();
|
||||||
parameters.Add(param);
|
parameters.Add(param);
|
||||||
XmlRpcRequest req = new XmlRpcRequest("logout_of_simulator", parameters);
|
XmlRpcRequest req = new XmlRpcRequest("logout_of_simulator", parameters);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 3000);
|
req.Send(m_parent.NetworkServersInfo.UserURL, 3000);
|
||||||
}
|
}
|
||||||
catch (WebException)
|
catch (WebException)
|
||||||
{
|
{
|
||||||
m_log.Warn("[LOGOFF]: Unable to notify grid server of user logoff");
|
m_log.Warn("[LOGOFF]: Unable to notify grid server of user logoff");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserProfileData GetUserProfile(string firstName, string lastName)
|
public UserProfileData GetUserProfile(string firstName, string lastName)
|
||||||
{
|
{
|
||||||
return GetUserProfile(firstName + " " + lastName);
|
return GetUserProfile(firstName + " " + lastName);
|
||||||
|
@ -556,7 +556,6 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
param["ownerID"] = friendlistowner.UUID.ToString();
|
param["ownerID"] = friendlistowner.UUID.ToString();
|
||||||
param["friendID"] = friend.UUID.ToString();
|
param["friendID"] = friend.UUID.ToString();
|
||||||
|
|
||||||
|
|
||||||
IList parameters = new ArrayList();
|
IList parameters = new ArrayList();
|
||||||
parameters.Add(param);
|
parameters.Add(param);
|
||||||
|
|
||||||
|
@ -682,10 +681,10 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// Appearance
|
/// Appearance
|
||||||
/// TODO: stubs for now to get us to a compiling state gently
|
|
||||||
public AvatarAppearance GetUserAppearance(LLUUID user)
|
public AvatarAppearance GetUserAppearance(LLUUID user)
|
||||||
{
|
{
|
||||||
AvatarAppearance appearance = null;
|
AvatarAppearance appearance = null;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Hashtable param = new Hashtable();
|
Hashtable param = new Hashtable();
|
||||||
|
@ -696,15 +695,14 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
XmlRpcRequest req = new XmlRpcRequest("get_avatar_appearance", parameters);
|
XmlRpcRequest req = new XmlRpcRequest("get_avatar_appearance", parameters);
|
||||||
XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 8000);
|
XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 8000);
|
||||||
Hashtable respData = (Hashtable) resp.Value;
|
Hashtable respData = (Hashtable) resp.Value;
|
||||||
|
|
||||||
return ConvertXMLRPCDataToAvatarAppearance(respData);
|
return ConvertXMLRPCDataToAvatarAppearance(respData);
|
||||||
}
|
}
|
||||||
catch (WebException e)
|
catch (WebException e)
|
||||||
{
|
{
|
||||||
m_log.Warn("[OGS1 USER SERVICES]: Error when trying to fetch Avatar's appearance: " +
|
m_log.ErrorFormat("[OGS1 USER SERVICES]: Network problems when trying to fetch appearance for avatar {0}, {1}", user, e.Message);
|
||||||
e.Message);
|
|
||||||
// Return Empty list (no friends)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return appearance;
|
return appearance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2131,14 +2131,31 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
return avatar;
|
return avatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get the avatar apperance for the given client.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="appearance"></param>
|
||||||
public void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance)
|
public void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance)
|
||||||
{
|
{
|
||||||
appearance = null; // VS needs this line, mono doesn't
|
appearance = null; // VS needs this line, mono doesn't
|
||||||
if (m_AvatarFactory == null ||
|
|
||||||
!m_AvatarFactory.TryGetAvatarAppearance(client.AgentId, out appearance))
|
try
|
||||||
{
|
{
|
||||||
m_log.Warn("[APPEARANCE]: Appearance not found, creating default");
|
if (m_AvatarFactory == null ||
|
||||||
|
!m_AvatarFactory.TryGetAvatarAppearance(client.AgentId, out appearance))
|
||||||
|
{
|
||||||
|
m_log.Warn("[APPEARANCE]: Appearance not found, creating default");
|
||||||
|
appearance = new AvatarAppearance();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
m_log.ErrorFormat(
|
||||||
|
"[APPERANCE]: Problem when fetching appearance for avatar {0}, {1}, using default. {2}",
|
||||||
|
client.Name, client.AgentId, e);
|
||||||
|
appearance = new AvatarAppearance();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue