diff options
Diffstat (limited to '')
6 files changed, 238 insertions, 118 deletions
diff --git a/OpenSim/Services/AvatarService/AvatarService.cs b/OpenSim/Services/AvatarService/AvatarService.cs index a8ad413..53ca7c8 100644 --- a/OpenSim/Services/AvatarService/AvatarService.cs +++ b/OpenSim/Services/AvatarService/AvatarService.cs | |||
@@ -51,8 +51,6 @@ namespace OpenSim.Services.AvatarService | |||
51 | m_log.Debug("[AVATAR SERVICE]: Starting avatar service"); | 51 | m_log.Debug("[AVATAR SERVICE]: Starting avatar service"); |
52 | } | 52 | } |
53 | 53 | ||
54 | // Get|SetAppearance should preserve existing semantics | ||
55 | // until AvatarData can be removed completely | ||
56 | public AvatarAppearance GetAppearance(UUID principalID) | 54 | public AvatarAppearance GetAppearance(UUID principalID) |
57 | { | 55 | { |
58 | AvatarData avatar = GetAvatar(principalID); | 56 | AvatarData avatar = GetAvatar(principalID); |
@@ -68,12 +66,15 @@ namespace OpenSim.Services.AvatarService | |||
68 | public AvatarData GetAvatar(UUID principalID) | 66 | public AvatarData GetAvatar(UUID principalID) |
69 | { | 67 | { |
70 | AvatarBaseData[] av = m_Database.Get("PrincipalID", principalID.ToString()); | 68 | AvatarBaseData[] av = m_Database.Get("PrincipalID", principalID.ToString()); |
71 | if (av.Length == 0) | ||
72 | return null; | ||
73 | |||
74 | AvatarData ret = new AvatarData(); | 69 | AvatarData ret = new AvatarData(); |
75 | ret.Data = new Dictionary<string,string>(); | 70 | ret.Data = new Dictionary<string,string>(); |
76 | 71 | ||
72 | if (av.Length == 0) | ||
73 | { | ||
74 | ret.AvatarType = 1; // SL avatar | ||
75 | return ret; | ||
76 | } | ||
77 | |||
77 | foreach (AvatarBaseData b in av) | 78 | foreach (AvatarBaseData b in av) |
78 | { | 79 | { |
79 | if (b.Data["Name"] == "AvatarType") | 80 | if (b.Data["Name"] == "AvatarType") |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs index ea9b4b4..7a28c2b 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs | |||
@@ -265,32 +265,33 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
265 | 265 | ||
266 | map["Height"] = OSD.FromReal(appearance.AvatarHeight); | 266 | map["Height"] = OSD.FromReal(appearance.AvatarHeight); |
267 | 267 | ||
268 | map["ShapeItem"] = OSD.FromUUID(appearance.BodyItem); | 268 | map["BodyItem"] = appearance.Wearables[AvatarWearable.BODY][0].ItemID.ToString(); |
269 | map["ShapeAsset"] = OSD.FromUUID(appearance.BodyAsset); | 269 | map["EyesItem"] = appearance.Wearables[AvatarWearable.EYES][0].ItemID.ToString(); |
270 | map["SkinItem"] = OSD.FromUUID(appearance.SkinItem); | 270 | map["GlovesItem"] = appearance.Wearables[AvatarWearable.GLOVES][0].ItemID.ToString(); |
271 | map["SkinAsset"] = OSD.FromUUID(appearance.SkinAsset); | 271 | map["HairItem"] = appearance.Wearables[AvatarWearable.HAIR][0].ItemID.ToString(); |
272 | map["HairItem"] = OSD.FromUUID(appearance.HairItem); | 272 | map["JacketItem"] = appearance.Wearables[AvatarWearable.JACKET][0].ItemID.ToString(); |
273 | map["HairAsset"] = OSD.FromUUID(appearance.HairAsset); | 273 | map["PantsItem"] = appearance.Wearables[AvatarWearable.PANTS][0].ItemID.ToString(); |
274 | map["EyesItem"] = OSD.FromUUID(appearance.EyesItem); | 274 | map["ShirtItem"] = appearance.Wearables[AvatarWearable.SHIRT][0].ItemID.ToString(); |
275 | map["EyesAsset"] = OSD.FromUUID(appearance.EyesAsset); | 275 | map["ShoesItem"] = appearance.Wearables[AvatarWearable.SHOES][0].ItemID.ToString(); |
276 | map["ShirtItem"] = OSD.FromUUID(appearance.ShirtItem); | 276 | map["SkinItem"] = appearance.Wearables[AvatarWearable.SKIN][0].ItemID.ToString(); |
277 | map["ShirtAsset"] = OSD.FromUUID(appearance.ShirtAsset); | 277 | map["SkirtItem"] = appearance.Wearables[AvatarWearable.SKIRT][0].ItemID.ToString(); |
278 | map["PantsItem"] = OSD.FromUUID(appearance.PantsItem); | 278 | map["SocksItem"] = appearance.Wearables[AvatarWearable.SOCKS][0].ItemID.ToString(); |
279 | map["PantsAsset"] = OSD.FromUUID(appearance.PantsAsset); | 279 | map["UnderPantsItem"] = appearance.Wearables[AvatarWearable.UNDERPANTS][0].ItemID.ToString(); |
280 | map["ShoesItem"] = OSD.FromUUID(appearance.ShoesItem); | 280 | map["UnderShirtItem"] = appearance.Wearables[AvatarWearable.UNDERSHIRT][0].ItemID.ToString(); |
281 | map["ShoesAsset"] = OSD.FromUUID(appearance.ShoesAsset); | 281 | map["BodyAsset"] = appearance.Wearables[AvatarWearable.BODY][0].AssetID.ToString(); |
282 | map["SocksItem"] = OSD.FromUUID(appearance.SocksItem); | 282 | map["EyesAsset"] = appearance.Wearables[AvatarWearable.EYES][0].AssetID.ToString(); |
283 | map["SocksAsset"] = OSD.FromUUID(appearance.SocksAsset); | 283 | map["GlovesAsset"] = appearance.Wearables[AvatarWearable.GLOVES][0].AssetID.ToString(); |
284 | map["JacketItem"] = OSD.FromUUID(appearance.JacketItem); | 284 | map["HairAsset"] = appearance.Wearables[AvatarWearable.HAIR][0].AssetID.ToString(); |
285 | map["JacketAsset"] = OSD.FromUUID(appearance.JacketAsset); | 285 | map["JacketAsset"] = appearance.Wearables[AvatarWearable.JACKET][0].AssetID.ToString(); |
286 | map["GlovesItem"] = OSD.FromUUID(appearance.GlovesItem); | 286 | map["PantsAsset"] = appearance.Wearables[AvatarWearable.PANTS][0].AssetID.ToString(); |
287 | map["GlovesAsset"] = OSD.FromUUID(appearance.GlovesAsset); | 287 | map["ShirtAsset"] = appearance.Wearables[AvatarWearable.SHIRT][0].AssetID.ToString(); |
288 | map["UndershirtItem"] = OSD.FromUUID(appearance.UnderShirtItem); | 288 | map["ShoesAsset"] = appearance.Wearables[AvatarWearable.SHOES][0].AssetID.ToString(); |
289 | map["UndershirtAsset"] = OSD.FromUUID(appearance.UnderShirtAsset); | 289 | map["SkinAsset"] = appearance.Wearables[AvatarWearable.SKIN][0].AssetID.ToString(); |
290 | map["UnderpantsItem"] = OSD.FromUUID(appearance.UnderPantsItem); | 290 | map["SkirtAsset"] = appearance.Wearables[AvatarWearable.SKIRT][0].AssetID.ToString(); |
291 | map["UnderpantsAsset"] = OSD.FromUUID(appearance.UnderPantsAsset); | 291 | map["SocksAsset"] = appearance.Wearables[AvatarWearable.SOCKS][0].AssetID.ToString(); |
292 | map["SkirtItem"] = OSD.FromUUID(appearance.SkirtItem); | 292 | map["UnderPantsAsset"] = appearance.Wearables[AvatarWearable.UNDERPANTS][0].AssetID.ToString(); |
293 | map["SkirtAsset"] = OSD.FromUUID(appearance.SkirtAsset); | 293 | map["UnderShirtAsset"] = appearance.Wearables[AvatarWearable.UNDERSHIRT][0].AssetID.ToString(); |
294 | |||
294 | 295 | ||
295 | OSDMap items = new OSDMap(); | 296 | OSDMap items = new OSDMap(); |
296 | foreach (KeyValuePair<string, string> kvp in avatar.Data) | 297 | foreach (KeyValuePair<string, string> kvp in avatar.Data) |
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 385ba31..0626ebe 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -117,7 +117,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
117 | } | 117 | } |
118 | catch (Exception e) | 118 | catch (Exception e) |
119 | { | 119 | { |
120 | m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent create. Reason: " + e.Message); | 120 | m_log.Error("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent create. Reason: " + e.Message); |
121 | reason = e.Message; | 121 | reason = e.Message; |
122 | return false; | 122 | return false; |
123 | } | 123 | } |
@@ -158,13 +158,13 @@ namespace OpenSim.Services.Connectors.Simulation | |||
158 | AgentCreateRequest.ContentLength = buffer.Length; //Count bytes to send | 158 | AgentCreateRequest.ContentLength = buffer.Length; //Count bytes to send |
159 | os = AgentCreateRequest.GetRequestStream(); | 159 | os = AgentCreateRequest.GetRequestStream(); |
160 | os.Write(buffer, 0, strBuffer.Length); //Send it | 160 | os.Write(buffer, 0, strBuffer.Length); //Send it |
161 | m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateAgent request to remote sim {0}, region {1}, x={2} y={3}", | 161 | m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateAgent request to remote sim {0}, region {1}, x={2} y={3}", |
162 | uri, destination.RegionName, destination.RegionLocX, destination.RegionLocY); | 162 | uri, destination.RegionName, destination.RegionLocX, destination.RegionLocY); |
163 | } | 163 | } |
164 | //catch (WebException ex) | 164 | //catch (WebException ex) |
165 | catch | 165 | catch |
166 | { | 166 | { |
167 | //m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on ChildAgentUpdate {0}", ex.Message); | 167 | //m_log.ErrorFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on ChildAgentUpdate {0}", ex.Message); |
168 | reason = "cannot contact remote region"; | 168 | reason = "cannot contact remote region"; |
169 | return false; | 169 | return false; |
170 | } | 170 | } |
@@ -191,19 +191,19 @@ namespace OpenSim.Services.Connectors.Simulation | |||
191 | webResponse = AgentCreateRequest.GetResponse(); | 191 | webResponse = AgentCreateRequest.GetResponse(); |
192 | if (webResponse == null) | 192 | if (webResponse == null) |
193 | { | 193 | { |
194 | m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on DoCreateChildAgentCall post"); | 194 | m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Null reply on DoCreateChildAgentCall post"); |
195 | } | 195 | } |
196 | else | 196 | else |
197 | { | 197 | { |
198 | 198 | ||
199 | sr = new StreamReader(webResponse.GetResponseStream()); | 199 | sr = new StreamReader(webResponse.GetResponseStream()); |
200 | response = sr.ReadToEnd().Trim(); | 200 | response = sr.ReadToEnd().Trim(); |
201 | m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: DoCreateChildAgentCall reply was {0} ", response); | 201 | m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: DoCreateChildAgentCall reply was {0} ", response); |
202 | } | 202 | } |
203 | } | 203 | } |
204 | catch (WebException ex) | 204 | catch (WebException ex) |
205 | { | 205 | { |
206 | m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", ex.Message); | 206 | m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", ex.Message); |
207 | reason = "Destination did not reply"; | 207 | reason = "Destination did not reply"; |
208 | return string.Empty; | 208 | return string.Empty; |
209 | } | 209 | } |
@@ -231,7 +231,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
231 | } | 231 | } |
232 | catch (NullReferenceException e) | 232 | catch (NullReferenceException e) |
233 | { | 233 | { |
234 | m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", e.Message); | 234 | m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of DoCreateChildAgentCall {0}", e.Message); |
235 | 235 | ||
236 | // check for old style response | 236 | // check for old style response |
237 | if (response.ToLower().StartsWith("true")) | 237 | if (response.ToLower().StartsWith("true")) |
@@ -251,7 +251,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
251 | } | 251 | } |
252 | catch (Exception e) | 252 | catch (Exception e) |
253 | { | 253 | { |
254 | m_log.Debug("[REMOTE SIMULATION CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message); | 254 | m_log.Warn("[REMOTE SIMULATION CONNECTOR]: PackAgentCircuitData failed with exception: " + e.Message); |
255 | return null; | 255 | return null; |
256 | } | 256 | } |
257 | // Add the input arguments | 257 | // Add the input arguments |
@@ -284,7 +284,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
284 | } | 284 | } |
285 | catch (Exception e) | 285 | catch (Exception e) |
286 | { | 286 | { |
287 | m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent update. Reason: " + e.Message); | 287 | m_log.Warn("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent update. Reason: " + e.Message); |
288 | return false; | 288 | return false; |
289 | } | 289 | } |
290 | //Console.WriteLine(" >>> DoAgentUpdateCall <<< " + uri); | 290 | //Console.WriteLine(" >>> DoAgentUpdateCall <<< " + uri); |
@@ -303,7 +303,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
303 | } | 303 | } |
304 | catch (Exception e) | 304 | catch (Exception e) |
305 | { | 305 | { |
306 | m_log.Debug("[REMOTE SIMULATION CONNECTOR]: PackUpdateMessage failed with exception: " + e.Message); | 306 | m_log.Warn("[REMOTE SIMULATION CONNECTOR]: PackUpdateMessage failed with exception: " + e.Message); |
307 | } | 307 | } |
308 | // Add the input arguments | 308 | // Add the input arguments |
309 | args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString()); | 309 | args["destination_x"] = OSD.FromString(destination.RegionLocX.ToString()); |
@@ -332,12 +332,12 @@ namespace OpenSim.Services.Connectors.Simulation | |||
332 | ChildUpdateRequest.ContentLength = buffer.Length; //Count bytes to send | 332 | ChildUpdateRequest.ContentLength = buffer.Length; //Count bytes to send |
333 | os = ChildUpdateRequest.GetRequestStream(); | 333 | os = ChildUpdateRequest.GetRequestStream(); |
334 | os.Write(buffer, 0, strBuffer.Length); //Send it | 334 | os.Write(buffer, 0, strBuffer.Length); //Send it |
335 | //m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted AgentUpdate request to remote sim {0}", uri); | 335 | //m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Posted AgentUpdate request to remote sim {0}", uri); |
336 | } | 336 | } |
337 | catch (WebException ex) | 337 | catch (WebException ex) |
338 | //catch | 338 | //catch |
339 | { | 339 | { |
340 | m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on AgentUpdate {0}", ex.Message); | 340 | m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on AgentUpdate {0}", ex.Message); |
341 | 341 | ||
342 | return false; | 342 | return false; |
343 | } | 343 | } |
@@ -348,7 +348,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
348 | } | 348 | } |
349 | 349 | ||
350 | // Let's wait for the response | 350 | // Let's wait for the response |
351 | //m_log.Info("[REMOTE SIMULATION CONNECTOR]: Waiting for a reply after ChildAgentUpdate"); | 351 | //m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Waiting for a reply after ChildAgentUpdate"); |
352 | 352 | ||
353 | WebResponse webResponse = null; | 353 | WebResponse webResponse = null; |
354 | StreamReader sr = null; | 354 | StreamReader sr = null; |
@@ -357,19 +357,19 @@ namespace OpenSim.Services.Connectors.Simulation | |||
357 | webResponse = ChildUpdateRequest.GetResponse(); | 357 | webResponse = ChildUpdateRequest.GetResponse(); |
358 | if (webResponse == null) | 358 | if (webResponse == null) |
359 | { | 359 | { |
360 | m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on ChilAgentUpdate post"); | 360 | m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Null reply on ChilAgentUpdate post"); |
361 | } | 361 | } |
362 | 362 | ||
363 | sr = new StreamReader(webResponse.GetResponseStream()); | 363 | sr = new StreamReader(webResponse.GetResponseStream()); |
364 | //reply = sr.ReadToEnd().Trim(); | 364 | //reply = sr.ReadToEnd().Trim(); |
365 | sr.ReadToEnd().Trim(); | 365 | sr.ReadToEnd().Trim(); |
366 | sr.Close(); | 366 | sr.Close(); |
367 | //m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: ChilAgentUpdate reply was {0} ", reply); | 367 | //m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: ChilAgentUpdate reply was {0} ", reply); |
368 | 368 | ||
369 | } | 369 | } |
370 | catch (WebException ex) | 370 | catch (WebException ex) |
371 | { | 371 | { |
372 | m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of ChilAgentUpdate from {0}: {1}", uri, ex.Message); | 372 | m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of ChilAgentUpdate from {0}: {1}", uri, ex.Message); |
373 | // ignore, really | 373 | // ignore, really |
374 | } | 374 | } |
375 | finally | 375 | finally |
@@ -403,7 +403,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
403 | webResponse = (HttpWebResponse)request.GetResponse(); | 403 | webResponse = (HttpWebResponse)request.GetResponse(); |
404 | if (webResponse == null) | 404 | if (webResponse == null) |
405 | { | 405 | { |
406 | m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on agent get "); | 406 | m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Null reply on agent get "); |
407 | } | 407 | } |
408 | 408 | ||
409 | sr = new StreamReader(webResponse.GetResponseStream()); | 409 | sr = new StreamReader(webResponse.GetResponseStream()); |
@@ -414,7 +414,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
414 | } | 414 | } |
415 | catch (WebException ex) | 415 | catch (WebException ex) |
416 | { | 416 | { |
417 | m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of agent get {0}", ex.Message); | 417 | m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of agent get {0}", ex.Message); |
418 | // ignore, really | 418 | // ignore, really |
419 | return false; | 419 | return false; |
420 | } | 420 | } |
@@ -455,7 +455,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
455 | WebResponse webResponse = request.GetResponse(); | 455 | WebResponse webResponse = request.GetResponse(); |
456 | if (webResponse == null) | 456 | if (webResponse == null) |
457 | { | 457 | { |
458 | m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on ReleaseAgent"); | 458 | m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Null reply on ReleaseAgent"); |
459 | } | 459 | } |
460 | 460 | ||
461 | sr = new StreamReader(webResponse.GetResponseStream()); | 461 | sr = new StreamReader(webResponse.GetResponseStream()); |
@@ -467,7 +467,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
467 | } | 467 | } |
468 | catch (WebException ex) | 468 | catch (WebException ex) |
469 | { | 469 | { |
470 | m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of ReleaseAgent {0}", ex.Message); | 470 | m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of ReleaseAgent {0}", ex.Message); |
471 | return false; | 471 | return false; |
472 | } | 472 | } |
473 | finally | 473 | finally |
@@ -488,7 +488,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
488 | } | 488 | } |
489 | catch (Exception e) | 489 | catch (Exception e) |
490 | { | 490 | { |
491 | m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent close. Reason: " + e.Message); | 491 | m_log.Warn("[REMOTE SIMULATION CONNECTOR]: Unable to resolve external endpoint on agent close. Reason: " + e.Message); |
492 | return false; | 492 | return false; |
493 | } | 493 | } |
494 | 494 | ||
@@ -506,7 +506,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
506 | WebResponse webResponse = request.GetResponse(); | 506 | WebResponse webResponse = request.GetResponse(); |
507 | if (webResponse == null) | 507 | if (webResponse == null) |
508 | { | 508 | { |
509 | m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on agent delete "); | 509 | m_log.Debug("[REMOTE SIMULATION CONNECTOR]: Null reply on agent delete "); |
510 | } | 510 | } |
511 | 511 | ||
512 | sr = new StreamReader(webResponse.GetResponseStream()); | 512 | sr = new StreamReader(webResponse.GetResponseStream()); |
@@ -518,7 +518,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
518 | } | 518 | } |
519 | catch (WebException ex) | 519 | catch (WebException ex) |
520 | { | 520 | { |
521 | m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of agent delete from {0}: {1}", destination.RegionName, ex.Message); | 521 | m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of agent delete from {0}: {1}", destination.RegionName, ex.Message); |
522 | return false; | 522 | return false; |
523 | } | 523 | } |
524 | finally | 524 | finally |
@@ -595,11 +595,11 @@ namespace OpenSim.Services.Connectors.Simulation | |||
595 | ObjectCreateRequest.ContentLength = buffer.Length; //Count bytes to send | 595 | ObjectCreateRequest.ContentLength = buffer.Length; //Count bytes to send |
596 | os = ObjectCreateRequest.GetRequestStream(); | 596 | os = ObjectCreateRequest.GetRequestStream(); |
597 | os.Write(buffer, 0, strBuffer.Length); //Send it | 597 | os.Write(buffer, 0, strBuffer.Length); //Send it |
598 | m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateObject request to remote sim {0}", uri); | 598 | m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Posted CreateObject request to remote sim {0}", uri); |
599 | } | 599 | } |
600 | catch (WebException ex) | 600 | catch (WebException ex) |
601 | { | 601 | { |
602 | m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on CreateObject {0}", ex.Message); | 602 | m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: Bad send on CreateObject {0}", ex.Message); |
603 | return false; | 603 | return false; |
604 | } | 604 | } |
605 | finally | 605 | finally |
@@ -617,7 +617,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
617 | WebResponse webResponse = ObjectCreateRequest.GetResponse(); | 617 | WebResponse webResponse = ObjectCreateRequest.GetResponse(); |
618 | if (webResponse == null) | 618 | if (webResponse == null) |
619 | { | 619 | { |
620 | m_log.Info("[REMOTE SIMULATION CONNECTOR]: Null reply on CreateObject post"); | 620 | m_log.Warn("[REMOTE SIMULATION CONNECTOR]: Null reply on CreateObject post"); |
621 | return false; | 621 | return false; |
622 | } | 622 | } |
623 | 623 | ||
@@ -629,7 +629,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
629 | } | 629 | } |
630 | catch (WebException ex) | 630 | catch (WebException ex) |
631 | { | 631 | { |
632 | m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of CreateObject {0}", ex.Message); | 632 | m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of CreateObject {0}", ex.Message); |
633 | return false; | 633 | return false; |
634 | } | 634 | } |
635 | finally | 635 | finally |
diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index eaa6534..d7af562 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs | |||
@@ -149,33 +149,28 @@ namespace OpenSim.Services.Interfaces | |||
149 | Data["Serial"] = appearance.Serial.ToString(); | 149 | Data["Serial"] = appearance.Serial.ToString(); |
150 | // Wearables | 150 | // Wearables |
151 | Data["AvatarHeight"] = appearance.AvatarHeight.ToString(); | 151 | Data["AvatarHeight"] = appearance.AvatarHeight.ToString(); |
152 | Data["BodyItem"] = appearance.BodyItem.ToString(); | 152 | |
153 | Data["EyesItem"] = appearance.EyesItem.ToString(); | 153 | for (int i = 0 ; i < AvatarWearable.MAX_WEARABLES ; i++) |
154 | Data["GlovesItem"] = appearance.GlovesItem.ToString(); | 154 | { |
155 | Data["HairItem"] = appearance.HairItem.ToString(); | 155 | for (int j = 0 ; j < appearance.Wearables[i].Count ; j++) |
156 | Data["JacketItem"] = appearance.JacketItem.ToString(); | 156 | { |
157 | Data["PantsItem"] = appearance.PantsItem.ToString(); | 157 | string fieldName = String.Format("Wearable {0}:{1}", i, j); |
158 | Data["ShirtItem"] = appearance.ShirtItem.ToString(); | 158 | Data[fieldName] = String.Format("{0}:{1}", |
159 | Data["ShoesItem"] = appearance.ShoesItem.ToString(); | 159 | appearance.Wearables[i][j].ItemID.ToString(), |
160 | Data["SkinItem"] = appearance.SkinItem.ToString(); | 160 | appearance.Wearables[i][j].AssetID.ToString()); |
161 | Data["SkirtItem"] = appearance.SkirtItem.ToString(); | 161 | } |
162 | Data["SocksItem"] = appearance.SocksItem.ToString(); | 162 | } |
163 | Data["UnderPantsItem"] = appearance.UnderPantsItem.ToString(); | 163 | |
164 | Data["UnderShirtItem"] = appearance.UnderShirtItem.ToString(); | 164 | // Visual Params |
165 | 165 | string[] vps = new string[AvatarAppearance.VISUALPARAM_COUNT]; | |
166 | Data["BodyAsset"] = appearance.BodyAsset.ToString(); | 166 | byte[] binary = appearance.VisualParams; |
167 | Data["EyesAsset"] = appearance.EyesAsset.ToString(); | 167 | |
168 | Data["GlovesAsset"] = appearance.GlovesAsset.ToString(); | 168 | for (int i = 0 ; i < AvatarAppearance.VISUALPARAM_COUNT ; i++) |
169 | Data["HairAsset"] = appearance.HairAsset.ToString(); | 169 | { |
170 | Data["JacketAsset"] = appearance.JacketAsset.ToString(); | 170 | vps[i] = binary[i].ToString(); |
171 | Data["PantsAsset"] = appearance.PantsAsset.ToString(); | 171 | } |
172 | Data["ShirtAsset"] = appearance.ShirtAsset.ToString(); | 172 | |
173 | Data["ShoesAsset"] = appearance.ShoesAsset.ToString(); | 173 | Data["VisualParams"] = String.Join(",", vps); |
174 | Data["SkinAsset"] = appearance.SkinAsset.ToString(); | ||
175 | Data["SkirtAsset"] = appearance.SkirtAsset.ToString(); | ||
176 | Data["SocksAsset"] = appearance.SocksAsset.ToString(); | ||
177 | Data["UnderPantsAsset"] = appearance.UnderPantsAsset.ToString(); | ||
178 | Data["UnderShirtAsset"] = appearance.UnderShirtAsset.ToString(); | ||
179 | 174 | ||
180 | // Attachments | 175 | // Attachments |
181 | List<AvatarAttachment> attachments = appearance.GetAttachments(); | 176 | List<AvatarAttachment> attachments = appearance.GetAttachments(); |
@@ -188,38 +183,114 @@ namespace OpenSim.Services.Interfaces | |||
188 | public AvatarAppearance ToAvatarAppearance(UUID owner) | 183 | public AvatarAppearance ToAvatarAppearance(UUID owner) |
189 | { | 184 | { |
190 | AvatarAppearance appearance = new AvatarAppearance(owner); | 185 | AvatarAppearance appearance = new AvatarAppearance(owner); |
186 | |||
187 | if (Data.Count == 0) | ||
188 | return appearance; | ||
189 | |||
190 | appearance.ClearWearables(); | ||
191 | try | 191 | try |
192 | { | 192 | { |
193 | appearance.Serial = Int32.Parse(Data["Serial"]); | 193 | if (Data.ContainsKey("Serial")) |
194 | 194 | appearance.Serial = Int32.Parse(Data["Serial"]); | |
195 | // Wearables | 195 | |
196 | appearance.BodyItem = UUID.Parse(Data["BodyItem"]); | 196 | if (Data.ContainsKey("AvatarHeight")) |
197 | appearance.EyesItem = UUID.Parse(Data["EyesItem"]); | 197 | appearance.AvatarHeight = float.Parse(Data["AvatarHeight"]); |
198 | appearance.GlovesItem = UUID.Parse(Data["GlovesItem"]); | 198 | |
199 | appearance.HairItem = UUID.Parse(Data["HairItem"]); | 199 | // Legacy Wearables |
200 | appearance.JacketItem = UUID.Parse(Data["JacketItem"]); | 200 | if (Data.ContainsKey("BodyItem")) |
201 | appearance.PantsItem = UUID.Parse(Data["PantsItem"]); | 201 | appearance.Wearables[AvatarWearable.BODY].Wear( |
202 | appearance.ShirtItem = UUID.Parse(Data["ShirtItem"]); | 202 | UUID.Parse(Data["BodyItem"]), |
203 | appearance.ShoesItem = UUID.Parse(Data["ShoesItem"]); | 203 | UUID.Parse(Data["BodyAsset"])); |
204 | appearance.SkinItem = UUID.Parse(Data["SkinItem"]); | 204 | |
205 | appearance.SkirtItem = UUID.Parse(Data["SkirtItem"]); | 205 | if (Data.ContainsKey("SkinItem")) |
206 | appearance.SocksItem = UUID.Parse(Data["SocksItem"]); | 206 | appearance.Wearables[AvatarWearable.SKIN].Wear( |
207 | appearance.UnderPantsItem = UUID.Parse(Data["UnderPantsItem"]); | 207 | UUID.Parse(Data["SkinItem"]), |
208 | appearance.UnderShirtItem = UUID.Parse(Data["UnderShirtItem"]); | 208 | UUID.Parse(Data["SkinAsset"])); |
209 | 209 | ||
210 | appearance.BodyAsset = UUID.Parse(Data["BodyAsset"]); | 210 | if (Data.ContainsKey("HairItem")) |
211 | appearance.EyesAsset = UUID.Parse(Data["EyesAsset"]); | 211 | appearance.Wearables[AvatarWearable.HAIR].Wear( |
212 | appearance.GlovesAsset = UUID.Parse(Data["GlovesAsset"]); | 212 | UUID.Parse(Data["HairItem"]), |
213 | appearance.HairAsset = UUID.Parse(Data["HairAsset"]); | 213 | UUID.Parse(Data["HairAsset"])); |
214 | appearance.JacketAsset = UUID.Parse(Data["JacketAsset"]); | 214 | |
215 | appearance.PantsAsset = UUID.Parse(Data["PantsAsset"]); | 215 | if (Data.ContainsKey("EyesItem")) |
216 | appearance.ShirtAsset = UUID.Parse(Data["ShirtAsset"]); | 216 | appearance.Wearables[AvatarWearable.EYES].Wear( |
217 | appearance.ShoesAsset = UUID.Parse(Data["ShoesAsset"]); | 217 | UUID.Parse(Data["EyesItem"]), |
218 | appearance.SkinAsset = UUID.Parse(Data["SkinAsset"]); | 218 | UUID.Parse(Data["EyesAsset"])); |
219 | appearance.SkirtAsset = UUID.Parse(Data["SkirtAsset"]); | 219 | |
220 | appearance.SocksAsset = UUID.Parse(Data["SocksAsset"]); | 220 | if (Data.ContainsKey("ShirtItem")) |
221 | appearance.UnderPantsAsset = UUID.Parse(Data["UnderPantsAsset"]); | 221 | appearance.Wearables[AvatarWearable.SHIRT].Wear( |
222 | appearance.UnderShirtAsset = UUID.Parse(Data["UnderShirtAsset"]); | 222 | UUID.Parse(Data["ShirtItem"]), |
223 | UUID.Parse(Data["ShirtAsset"])); | ||
224 | |||
225 | if (Data.ContainsKey("PantsItem")) | ||
226 | appearance.Wearables[AvatarWearable.PANTS].Wear( | ||
227 | UUID.Parse(Data["PantsItem"]), | ||
228 | UUID.Parse(Data["PantsAsset"])); | ||
229 | |||
230 | if (Data.ContainsKey("ShoesItem")) | ||
231 | appearance.Wearables[AvatarWearable.SHOES].Wear( | ||
232 | UUID.Parse(Data["ShoesItem"]), | ||
233 | UUID.Parse(Data["ShoesAsset"])); | ||
234 | |||
235 | if (Data.ContainsKey("SocksItem")) | ||
236 | appearance.Wearables[AvatarWearable.SOCKS].Wear( | ||
237 | UUID.Parse(Data["SocksItem"]), | ||
238 | UUID.Parse(Data["SocksAsset"])); | ||
239 | |||
240 | if (Data.ContainsKey("JacketItem")) | ||
241 | appearance.Wearables[AvatarWearable.JACKET].Wear( | ||
242 | UUID.Parse(Data["JacketItem"]), | ||
243 | UUID.Parse(Data["JacketAsset"])); | ||
244 | |||
245 | if (Data.ContainsKey("GlovesItem")) | ||
246 | appearance.Wearables[AvatarWearable.GLOVES].Wear( | ||
247 | UUID.Parse(Data["GlovesItem"]), | ||
248 | UUID.Parse(Data["GlovesAsset"])); | ||
249 | |||
250 | if (Data.ContainsKey("UnderShirtItem")) | ||
251 | appearance.Wearables[AvatarWearable.UNDERSHIRT].Wear( | ||
252 | UUID.Parse(Data["UnderShirtItem"]), | ||
253 | UUID.Parse(Data["UnderShirtAsset"])); | ||
254 | |||
255 | if (Data.ContainsKey("UnderPantsItem")) | ||
256 | appearance.Wearables[AvatarWearable.UNDERPANTS].Wear( | ||
257 | UUID.Parse(Data["UnderPantsItem"]), | ||
258 | UUID.Parse(Data["UnderPantsAsset"])); | ||
259 | |||
260 | if (Data.ContainsKey("SkirtItem")) | ||
261 | appearance.Wearables[AvatarWearable.SKIRT].Wear( | ||
262 | UUID.Parse(Data["SkirtItem"]), | ||
263 | UUID.Parse(Data["SkirtAsset"])); | ||
264 | |||
265 | |||
266 | if (Data.ContainsKey("VisualParams")) | ||
267 | { | ||
268 | string[] vps = Data["VisualParams"].Split(new char[] {','}); | ||
269 | byte[] binary = new byte[AvatarAppearance.VISUALPARAM_COUNT]; | ||
270 | |||
271 | for (int i = 0 ; i < vps.Length && i < binary.Length ; i++) | ||
272 | binary[i] = (byte)Convert.ToInt32(vps[i]); | ||
273 | |||
274 | appearance.VisualParams = binary; | ||
275 | } | ||
276 | |||
277 | // New style wearables | ||
278 | foreach (KeyValuePair<string, string> _kvp in Data) | ||
279 | { | ||
280 | if (_kvp.Key.StartsWith("Wearable ")) | ||
281 | { | ||
282 | string wearIndex = _kvp.Key.Substring(9); | ||
283 | string[] wearIndices = wearIndex.Split(new char[] {':'}); | ||
284 | int index = Convert.ToInt32(wearIndices[0]); | ||
285 | |||
286 | string[] ids = _kvp.Value.Split(new char[] {':'}); | ||
287 | UUID itemID = new UUID(ids[0]); | ||
288 | UUID assetID = new UUID(ids[1]); | ||
289 | |||
290 | appearance.Wearables[index].Add(itemID, assetID); | ||
291 | } | ||
292 | } | ||
293 | |||
223 | 294 | ||
224 | // Attachments | 295 | // Attachments |
225 | Dictionary<string, string> attchs = new Dictionary<string, string>(); | 296 | Dictionary<string, string> attchs = new Dictionary<string, string>(); |
@@ -239,6 +310,26 @@ namespace OpenSim.Services.Interfaces | |||
239 | 310 | ||
240 | appearance.SetAttachment(point,uuid,UUID.Zero); | 311 | appearance.SetAttachment(point,uuid,UUID.Zero); |
241 | } | 312 | } |
313 | |||
314 | if (appearance.Wearables[AvatarWearable.BODY].Count == 0) | ||
315 | appearance.Wearables[AvatarWearable.BODY].Wear( | ||
316 | AvatarWearable.DefaultWearables[ | ||
317 | AvatarWearable.BODY][0]); | ||
318 | |||
319 | if (appearance.Wearables[AvatarWearable.SKIN].Count == 0) | ||
320 | appearance.Wearables[AvatarWearable.SKIN].Wear( | ||
321 | AvatarWearable.DefaultWearables[ | ||
322 | AvatarWearable.SKIN][0]); | ||
323 | |||
324 | if (appearance.Wearables[AvatarWearable.HAIR].Count == 0) | ||
325 | appearance.Wearables[AvatarWearable.HAIR].Wear( | ||
326 | AvatarWearable.DefaultWearables[ | ||
327 | AvatarWearable.HAIR][0]); | ||
328 | |||
329 | if (appearance.Wearables[AvatarWearable.EYES].Count == 0) | ||
330 | appearance.Wearables[AvatarWearable.EYES].Wear( | ||
331 | AvatarWearable.DefaultWearables[ | ||
332 | AvatarWearable.EYES][0]); | ||
242 | } | 333 | } |
243 | catch | 334 | catch |
244 | { | 335 | { |
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index cce8f2c..8cf846b 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs | |||
@@ -97,7 +97,7 @@ namespace OpenSim.Services.Interfaces | |||
97 | int GetRegionFlags(UUID scopeID, UUID regionID); | 97 | int GetRegionFlags(UUID scopeID, UUID regionID); |
98 | } | 98 | } |
99 | 99 | ||
100 | public class GridRegion | 100 | public class GridRegion : Object |
101 | { | 101 | { |
102 | 102 | ||
103 | /// <summary> | 103 | /// <summary> |
@@ -225,6 +225,33 @@ namespace OpenSim.Services.Interfaces | |||
225 | EstateOwner = ConvertFrom.EstateOwner; | 225 | EstateOwner = ConvertFrom.EstateOwner; |
226 | } | 226 | } |
227 | 227 | ||
228 | # region Definition of equality | ||
229 | |||
230 | /// <summary> | ||
231 | /// Define equality as two regions having the same, non-zero UUID. | ||
232 | /// </summary> | ||
233 | public bool Equals(GridRegion region) | ||
234 | { | ||
235 | if ((object)region == null) | ||
236 | return false; | ||
237 | // Return true if the non-zero UUIDs are equal: | ||
238 | return (RegionID != UUID.Zero) && RegionID.Equals(region.RegionID); | ||
239 | } | ||
240 | |||
241 | public override bool Equals(Object obj) | ||
242 | { | ||
243 | if (obj == null) | ||
244 | return false; | ||
245 | return Equals(obj as GridRegion); | ||
246 | } | ||
247 | |||
248 | public override int GetHashCode() | ||
249 | { | ||
250 | return RegionID.GetHashCode() ^ TerrainImage.GetHashCode(); | ||
251 | } | ||
252 | |||
253 | #endregion | ||
254 | |||
228 | /// <value> | 255 | /// <value> |
229 | /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw. | 256 | /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw. |
230 | /// | 257 | /// |
diff --git a/OpenSim/Services/PresenceService/PresenceService.cs b/OpenSim/Services/PresenceService/PresenceService.cs index 976153f..09c31c3 100644 --- a/OpenSim/Services/PresenceService/PresenceService.cs +++ b/OpenSim/Services/PresenceService/PresenceService.cs | |||
@@ -88,7 +88,7 @@ namespace OpenSim.Services.PresenceService | |||
88 | 88 | ||
89 | public bool ReportAgent(UUID sessionID, UUID regionID) | 89 | public bool ReportAgent(UUID sessionID, UUID regionID) |
90 | { | 90 | { |
91 | m_log.DebugFormat("[PRESENCE SERVICE]: ReportAgent with session {0} in region {1}", sessionID, regionID); | 91 | // m_log.DebugFormat("[PRESENCE SERVICE]: ReportAgent with session {0} in region {1}", sessionID, regionID); |
92 | try | 92 | try |
93 | { | 93 | { |
94 | PresenceData pdata = m_Database.Get(sessionID); | 94 | PresenceData pdata = m_Database.Get(sessionID); |