aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server
diff options
context:
space:
mode:
authorDiva Canto2012-09-15 19:35:33 -0700
committerDiva Canto2012-09-15 19:35:33 -0700
commitdaa4745fb785d30de256f04c763bfd6478ea2238 (patch)
treea68b49adb21eb5902f0e3a9687878e6c6db5e014 /OpenSim/Server
parentMore on HG2.0: added the possibility of controlling the appearance that avies... (diff)
parentBulletSim: update DLLs and SOs and remove some debugging code. (diff)
downloadopensim-SC_OLD-daa4745fb785d30de256f04c763bfd6478ea2238.zip
opensim-SC_OLD-daa4745fb785d30de256f04c763bfd6478ea2238.tar.gz
opensim-SC_OLD-daa4745fb785d30de256f04c763bfd6478ea2238.tar.bz2
opensim-SC_OLD-daa4745fb785d30de256f04c763bfd6478ea2238.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Server')
-rw-r--r--OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs b/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs
index 393584e..8cd747e 100644
--- a/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs
@@ -137,6 +137,8 @@ namespace OpenSim.Server.Handlers.Avatar
137 if (!UUID.TryParse(request["UserID"].ToString(), out user)) 137 if (!UUID.TryParse(request["UserID"].ToString(), out user))
138 return FailureResult(); 138 return FailureResult();
139 139
140 RemoveRequestParamsNotForStorage(request);
141
140 AvatarData avatar = new AvatarData(request); 142 AvatarData avatar = new AvatarData(request);
141 if (m_AvatarService.SetAvatar(user, avatar)) 143 if (m_AvatarService.SetAvatar(user, avatar))
142 return SuccessResult(); 144 return SuccessResult();
@@ -153,11 +155,25 @@ namespace OpenSim.Server.Handlers.Avatar
153 if (!UUID.TryParse(request["UserID"].ToString(), out user)) 155 if (!UUID.TryParse(request["UserID"].ToString(), out user))
154 return FailureResult(); 156 return FailureResult();
155 157
158 RemoveRequestParamsNotForStorage(request);
159
156 if (m_AvatarService.ResetAvatar(user)) 160 if (m_AvatarService.ResetAvatar(user))
157 return SuccessResult(); 161 return SuccessResult();
158 162
159 return FailureResult(); 163 return FailureResult();
160 } 164 }
165
166 /// <summary>
167 /// Remove parameters that were used to invoke the method and should not in themselves be persisted.
168 /// </summary>
169 /// <param name='request'></param>
170 private void RemoveRequestParamsNotForStorage(Dictionary<string, object> request)
171 {
172 request.Remove("VERSIONMAX");
173 request.Remove("VERSIONMIN");
174 request.Remove("METHOD");
175 request.Remove("UserID");
176 }
161 177
162 byte[] SetItems(Dictionary<string, object> request) 178 byte[] SetItems(Dictionary<string, object> request)
163 { 179 {
@@ -173,6 +189,8 @@ namespace OpenSim.Server.Handlers.Avatar
173 if (!(request["Names"] is List<string> || request["Values"] is List<string>)) 189 if (!(request["Names"] is List<string> || request["Values"] is List<string>))
174 return FailureResult(); 190 return FailureResult();
175 191
192 RemoveRequestParamsNotForStorage(request);
193
176 List<string> _names = (List<string>)request["Names"]; 194 List<string> _names = (List<string>)request["Names"];
177 names = _names.ToArray(); 195 names = _names.ToArray();
178 List<string> _values = (List<string>)request["Values"]; 196 List<string> _values = (List<string>)request["Values"];