diff options
author | Justin Clarke Casey | 2008-06-19 17:03:59 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-06-19 17:03:59 +0000 |
commit | f69f6961815c3916df8e30fbfdb2faa4906cf025 (patch) | |
tree | db3dc50abf086835a272944c56c39477471bf389 /OpenSim/Region/Environment/Scenes | |
parent | oops, build break. needed to include another reference. (diff) | |
download | opensim-SC-f69f6961815c3916df8e30fbfdb2faa4906cf025.zip opensim-SC-f69f6961815c3916df8e30fbfdb2faa4906cf025.tar.gz opensim-SC-f69f6961815c3916df8e30fbfdb2faa4906cf025.tar.bz2 opensim-SC-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/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 23 |
1 files changed, 20 insertions, 3 deletions
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> |