aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-06-19 17:03:59 +0000
committerJustin Clarke Casey2008-06-19 17:03:59 +0000
commitf69f6961815c3916df8e30fbfdb2faa4906cf025 (patch)
treedb3dc50abf086835a272944c56c39477471bf389 /OpenSim/Region
parentoops, build break. needed to include another reference. (diff)
downloadopensim-SC_OLD-f69f6961815c3916df8e30fbfdb2faa4906cf025.zip
opensim-SC_OLD-f69f6961815c3916df8e30fbfdb2faa4906cf025.tar.gz
opensim-SC_OLD-f69f6961815c3916df8e30fbfdb2faa4906cf025.tar.bz2
opensim-SC_OLD-f69f6961815c3916df8e30fbfdb2faa4906cf025.tar.xz
* 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
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1UserServices.cs16
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs23
2 files changed, 27 insertions, 12 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
index a31570e..0ffc4b2 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
@@ -232,17 +232,17 @@ namespace OpenSim.Region.Communications.OGS1
232 IList parameters = new ArrayList(); 232 IList parameters = new ArrayList();
233 parameters.Add(param); 233 parameters.Add(param);
234 XmlRpcRequest req = new XmlRpcRequest("logout_of_simulator", parameters); 234 XmlRpcRequest req = new XmlRpcRequest("logout_of_simulator", parameters);
235
235 try 236 try
236 { 237 {
237 XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 3000); 238 req.Send(m_parent.NetworkServersInfo.UserURL, 3000);
238 } 239 }
239 catch (WebException) 240 catch (WebException)
240 { 241 {
241 m_log.Warn("[LOGOFF]: Unable to notify grid server of user logoff"); 242 m_log.Warn("[LOGOFF]: Unable to notify grid server of user logoff");
242 } 243 }
243
244
245 } 244 }
245
246 public UserProfileData GetUserProfile(string firstName, string lastName) 246 public UserProfileData GetUserProfile(string firstName, string lastName)
247 { 247 {
248 return GetUserProfile(firstName + " " + lastName); 248 return GetUserProfile(firstName + " " + lastName);
@@ -556,7 +556,6 @@ namespace OpenSim.Region.Communications.OGS1
556 param["ownerID"] = friendlistowner.UUID.ToString(); 556 param["ownerID"] = friendlistowner.UUID.ToString();
557 param["friendID"] = friend.UUID.ToString(); 557 param["friendID"] = friend.UUID.ToString();
558 558
559
560 IList parameters = new ArrayList(); 559 IList parameters = new ArrayList();
561 parameters.Add(param); 560 parameters.Add(param);
562 561
@@ -682,10 +681,10 @@ namespace OpenSim.Region.Communications.OGS1
682 #endregion 681 #endregion
683 682
684 /// Appearance 683 /// Appearance
685 /// TODO: stubs for now to get us to a compiling state gently
686 public AvatarAppearance GetUserAppearance(LLUUID user) 684 public AvatarAppearance GetUserAppearance(LLUUID user)
687 { 685 {
688 AvatarAppearance appearance = null; 686 AvatarAppearance appearance = null;
687
689 try 688 try
690 { 689 {
691 Hashtable param = new Hashtable(); 690 Hashtable param = new Hashtable();
@@ -696,15 +695,14 @@ namespace OpenSim.Region.Communications.OGS1
696 XmlRpcRequest req = new XmlRpcRequest("get_avatar_appearance", parameters); 695 XmlRpcRequest req = new XmlRpcRequest("get_avatar_appearance", parameters);
697 XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 8000); 696 XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 8000);
698 Hashtable respData = (Hashtable) resp.Value; 697 Hashtable respData = (Hashtable) resp.Value;
699 698
700 return ConvertXMLRPCDataToAvatarAppearance(respData); 699 return ConvertXMLRPCDataToAvatarAppearance(respData);
701 } 700 }
702 catch (WebException e) 701 catch (WebException e)
703 { 702 {
704 m_log.Warn("[OGS1 USER SERVICES]: Error when trying to fetch Avatar's appearance: " + 703 m_log.ErrorFormat("[OGS1 USER SERVICES]: Network problems when trying to fetch appearance for avatar {0}, {1}", user, e.Message);
705 e.Message);
706 // Return Empty list (no friends)
707 } 704 }
705
708 return appearance; 706 return appearance;
709 } 707 }
710 708
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 7e3937c..cfebd14 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -2131,14 +2131,31 @@ namespace OpenSim.Region.Environment.Scenes
2131 return avatar; 2131 return avatar;
2132 } 2132 }
2133 2133
2134 /// <summary>
2135 /// Get the avatar apperance for the given client.
2136 /// </summary>
2137 /// <param name="client"></param>
2138 /// <param name="appearance"></param>
2134 public void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance) 2139 public void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance)
2135 { 2140 {
2136 appearance = null; // VS needs this line, mono doesn't 2141 appearance = null; // VS needs this line, mono doesn't
2137 if (m_AvatarFactory == null || 2142
2138 !m_AvatarFactory.TryGetAvatarAppearance(client.AgentId, out appearance)) 2143 try
2139 { 2144 {
2140 m_log.Warn("[APPEARANCE]: Appearance not found, creating default"); 2145 if (m_AvatarFactory == null ||
2146 !m_AvatarFactory.TryGetAvatarAppearance(client.AgentId, out appearance))
2147 {
2148 m_log.Warn("[APPEARANCE]: Appearance not found, creating default");
2149 appearance = new AvatarAppearance();
2150 }
2141 } 2151 }
2152 catch (Exception e)
2153 {
2154 m_log.ErrorFormat(
2155 "[APPERANCE]: Problem when fetching appearance for avatar {0}, {1}, using default. {2}",
2156 client.Name, client.AgentId, e);
2157 appearance = new AvatarAppearance();
2158 }
2142 } 2159 }
2143 2160
2144 /// <summary> 2161 /// <summary>