aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorTeravus Ovares2007-12-21 19:00:07 +0000
committerTeravus Ovares2007-12-21 19:00:07 +0000
commit13f85c9d8262f386d722969cd5222b05d123baa4 (patch)
treec4e287271385e774f48e23bdda5269fbbdebdbd6 /OpenSim
parentMake xml filename capitalizations consistent with actual capitalizations (diff)
downloadopensim-SC-13f85c9d8262f386d722969cd5222b05d123baa4.zip
opensim-SC-13f85c9d8262f386d722969cd5222b05d123baa4.tar.gz
opensim-SC-13f85c9d8262f386d722969cd5222b05d123baa4.tar.bz2
opensim-SC-13f85c9d8262f386d722969cd5222b05d123baa4.tar.xz
* Fixed UserServer crash when it's passed 00000000000000000000000000 as the UUID.
* It turns out that by proxy, this means that you won't have to look up people's UUID anymore in grid mode, If the UUID is LLUUID.Zero, it tries to look up avatar by name.
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/UserServer/UserManager.cs31
1 files changed, 28 insertions, 3 deletions
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs
index 43239a0..be9e6f1 100644
--- a/OpenSim/Grid/UserServer/UserManager.cs
+++ b/OpenSim/Grid/UserServer/UserManager.cs
@@ -156,8 +156,22 @@ namespace OpenSim.Grid.UserServer
156 UserProfileData userProfile; 156 UserProfileData userProfile;
157 if (requestData.Contains("avatar_name")) 157 if (requestData.Contains("avatar_name"))
158 { 158 {
159 userProfile = GetUserProfile((string) requestData["avatar_name"]); 159 string query = (string)requestData["avatar_name"];
160 if (userProfile == null) 160
161 System.Text.RegularExpressions.Regex objAlphaNumericPattern = new System.Text.RegularExpressions.Regex("[^a-zA-Z0-9]");
162
163 string[] querysplit;
164 querysplit = query.Split(' ');
165
166 if (querysplit.Length == 2)
167 {
168 userProfile = GetUserProfile(querysplit[0],querysplit[1]);
169 if (userProfile == null)
170 {
171 return CreateUnknownUserErrorResponse();
172 }
173 }
174 else
161 { 175 {
162 return CreateUnknownUserErrorResponse(); 176 return CreateUnknownUserErrorResponse();
163 } 177 }
@@ -179,7 +193,18 @@ namespace OpenSim.Grid.UserServer
179 //CFK: Console.WriteLine("METHOD BY UUID CALLED"); 193 //CFK: Console.WriteLine("METHOD BY UUID CALLED");
180 if (requestData.Contains("avatar_uuid")) 194 if (requestData.Contains("avatar_uuid"))
181 { 195 {
182 userProfile = GetUserProfile((LLUUID) (string) requestData["avatar_uuid"]); 196 LLUUID guess = new LLUUID();
197 try
198 {
199 guess = new LLUUID((string)requestData["avatar_uuid"]);
200
201 userProfile = GetUserProfile(guess);
202 }
203 catch (System.FormatException)
204 {
205 return CreateUnknownUserErrorResponse();
206 }
207
183 if (userProfile == null) 208 if (userProfile == null)
184 { 209 {
185 return CreateUnknownUserErrorResponse(); 210 return CreateUnknownUserErrorResponse();