aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World/WorldMap
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-19 06:15:21 +0000
committerMelanie Thielker2008-11-19 06:15:21 +0000
commit3234472d6203671a492a73042a0b56d6301903e0 (patch)
tree2d4c6ef2b21ee24d315e27564b5426cdfe77e9b3 /OpenSim/Region/Environment/Modules/World/WorldMap
parentEnsure that the physics representation of a deleted object is also removed (diff)
downloadopensim-SC-3234472d6203671a492a73042a0b56d6301903e0.zip
opensim-SC-3234472d6203671a492a73042a0b56d6301903e0.tar.gz
opensim-SC-3234472d6203671a492a73042a0b56d6301903e0.tar.bz2
opensim-SC-3234472d6203671a492a73042a0b56d6301903e0.tar.xz
Reverting the texture sending patch and the new libOMV. This makes this
release a direct descendant of the stable 7364, with all the features and none of the issues. This omits the following patch chain: r7383 r7382 r7381 r7377 r7375 r7373 r7372 r7370 r7369 r7368 r7367 r7366
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/WorldMap')
-rw-r--r--OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs112
1 files changed, 56 insertions, 56 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
index 8318cdc..c51a314 100644
--- a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
@@ -48,9 +48,9 @@ using OpenSim.Region.Environment.Scenes;
48using OpenSim.Region.Environment.Types; 48using OpenSim.Region.Environment.Types;
49using Caps = OpenSim.Framework.Communications.Capabilities.Caps; 49using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
50 50
51using OSD = OpenMetaverse.StructuredData.OSD; 51using LLSD = OpenMetaverse.StructuredData.LLSD;
52using OSDMap = OpenMetaverse.StructuredData.OSDMap; 52using LLSDMap = OpenMetaverse.StructuredData.LLSDMap;
53using OSDArray = OpenMetaverse.StructuredData.OSDArray; 53using LLSDArray = OpenMetaverse.StructuredData.LLSDArray;
54 54
55namespace OpenSim.Region.Environment.Modules.World.WorldMap 55namespace OpenSim.Region.Environment.Modules.World.WorldMap
56{ 56{
@@ -202,7 +202,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
202 } 202 }
203 } 203 }
204 LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse(); 204 LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse();
205 mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse()); 205 mapResponse.LayerData.Array.Add(GetLLSDMapLayerResponse());
206 return mapResponse.ToString(); 206 return mapResponse.ToString();
207 } 207 }
208 208
@@ -215,7 +215,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
215 { 215 {
216 m_log.Debug("[CAPS]: MapLayer Request in region: " + m_scene.RegionInfo.RegionName); 216 m_log.Debug("[CAPS]: MapLayer Request in region: " + m_scene.RegionInfo.RegionName);
217 LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse(); 217 LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse();
218 mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse()); 218 mapResponse.LayerData.Array.Add(GetLLSDMapLayerResponse());
219 return mapResponse; 219 return mapResponse;
220 } 220 }
221 221
@@ -223,9 +223,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
223 /// 223 ///
224 /// </summary> 224 /// </summary>
225 /// <returns></returns> 225 /// <returns></returns>
226 protected static OSDMapLayer GetOSDMapLayerResponse() 226 protected static LLSDMapLayer GetLLSDMapLayerResponse()
227 { 227 {
228 OSDMapLayer mapLayer = new OSDMapLayer(); 228 LLSDMapLayer mapLayer = new LLSDMapLayer();
229 mapLayer.Right = 5000; 229 mapLayer.Right = 5000;
230 mapLayer.Top = 5000; 230 mapLayer.Top = 5000;
231 mapLayer.ImageID = new UUID("00000000-0000-1111-9999-000000000006"); 231 mapLayer.ImageID = new UUID("00000000-0000-1111-9999-000000000006");
@@ -321,7 +321,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
321 } 321 }
322 uint xstart = 0; 322 uint xstart = 0;
323 uint ystart = 0; 323 uint ystart = 0;
324 Utils.LongToUInts(m_scene.RegionInfo.RegionHandle, out xstart, out ystart); 324 Helpers.LongToUInts(m_scene.RegionInfo.RegionHandle, out xstart, out ystart);
325 if (itemtype == 6) // we only sevice 6 right now (avatar green dots) 325 if (itemtype == 6) // we only sevice 6 right now (avatar green dots)
326 { 326 {
327 if (regionhandle == 0 || regionhandle == m_scene.RegionInfo.RegionHandle) 327 if (regionhandle == 0 || regionhandle == m_scene.RegionInfo.RegionHandle)
@@ -407,7 +407,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
407 407
408 if (dorequest) 408 if (dorequest)
409 { 409 {
410 OSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle); 410 LLSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle);
411 RequestMapItemsCompleted(response); 411 RequestMapItemsCompleted(response);
412 } 412 }
413 } 413 }
@@ -433,8 +433,8 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
433 /// <summary> 433 /// <summary>
434 /// Sends the mapitem response to the IClientAPI 434 /// Sends the mapitem response to the IClientAPI
435 /// </summary> 435 /// </summary>
436 /// <param name="response">The OSDMap Response for the mapitem</param> 436 /// <param name="response">The LLSDMap Response for the mapitem</param>
437 private void RequestMapItemsCompleted(OSDMap response) 437 private void RequestMapItemsCompleted(LLSDMap response)
438 { 438 {
439 UUID requestID = response["requestID"].AsUUID(); 439 UUID requestID = response["requestID"].AsUUID();
440 440
@@ -460,10 +460,10 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
460 if (response.ContainsKey(mrs.itemtype.ToString())) 460 if (response.ContainsKey(mrs.itemtype.ToString()))
461 { 461 {
462 List<mapItemReply> returnitems = new List<mapItemReply>(); 462 List<mapItemReply> returnitems = new List<mapItemReply>();
463 OSDArray itemarray = (OSDArray)response[mrs.itemtype.ToString()]; 463 LLSDArray itemarray = (LLSDArray)response[mrs.itemtype.ToString()];
464 for (int i = 0; i < itemarray.Count; i++) 464 for (int i = 0; i < itemarray.Count; i++)
465 { 465 {
466 OSDMap mapitem = (OSDMap)itemarray[i]; 466 LLSDMap mapitem = (LLSDMap)itemarray[i];
467 mapItemReply mi = new mapItemReply(); 467 mapItemReply mi = new mapItemReply();
468 mi.x = (uint)mapitem["X"].AsInteger(); 468 mi.x = (uint)mapitem["X"].AsInteger();
469 mi.y = (uint)mapitem["Y"].AsInteger(); 469 mi.y = (uint)mapitem["Y"].AsInteger();
@@ -517,7 +517,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
517 /// <param name="itemtype">passed in from packet</param> 517 /// <param name="itemtype">passed in from packet</param>
518 /// <param name="regionhandle">Region we're looking up</param> 518 /// <param name="regionhandle">Region we're looking up</param>
519 /// <returns></returns> 519 /// <returns></returns>
520 private OSDMap RequestMapItemsAsync(string httpserver, UUID id, uint flags, 520 private LLSDMap RequestMapItemsAsync(string httpserver, UUID id, uint flags,
521 uint EstateID, bool godlike, uint itemtype, ulong regionhandle) 521 uint EstateID, bool godlike, uint itemtype, ulong regionhandle)
522 { 522 {
523 bool blacklisted = false; 523 bool blacklisted = false;
@@ -528,7 +528,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
528 } 528 }
529 529
530 if (blacklisted) 530 if (blacklisted)
531 return new OSDMap(); 531 return new LLSDMap();
532 532
533 UUID requestID = UUID.Random(); 533 UUID requestID = UUID.Random();
534 lock (m_cachedRegionMapItemsAddress) 534 lock (m_cachedRegionMapItemsAddress)
@@ -569,7 +569,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
569 569
570 // Can't find the http server 570 // Can't find the http server
571 if (httpserver.Length == 0 || blacklisted) 571 if (httpserver.Length == 0 || blacklisted)
572 return new OSDMap(); 572 return new LLSDMap();
573 573
574 MapRequestState mrs = new MapRequestState(); 574 MapRequestState mrs = new MapRequestState();
575 mrs.agentID = id; 575 mrs.agentID = id;
@@ -585,14 +585,14 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
585 WebRequest mapitemsrequest = WebRequest.Create(httpserver); 585 WebRequest mapitemsrequest = WebRequest.Create(httpserver);
586 mapitemsrequest.Method = "POST"; 586 mapitemsrequest.Method = "POST";
587 mapitemsrequest.ContentType = "application/xml+llsd"; 587 mapitemsrequest.ContentType = "application/xml+llsd";
588 OSDMap RAMap = new OSDMap(); 588 LLSDMap RAMap = new LLSDMap();
589 589
590 // string RAMapString = RAMap.ToString(); 590 // string RAMapString = RAMap.ToString();
591 OSD LLSDofRAMap = RAMap; // RENAME if this works 591 LLSD LLSDofRAMap = RAMap; // RENAME if this works
592 592
593 byte[] buffer = OSDParser.SerializeLLSDXmlBytes(LLSDofRAMap); 593 byte[] buffer = LLSDParser.SerializeXmlBytes(LLSDofRAMap);
594 OSDMap responseMap = new OSDMap(); 594 LLSDMap responseMap = new LLSDMap();
595 responseMap["requestID"] = OSD.FromUUID(requestID); 595 responseMap["requestID"] = LLSD.FromUUID(requestID);
596 596
597 Stream os = null; 597 Stream os = null;
598 try 598 try
@@ -606,7 +606,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
606 catch (WebException ex) 606 catch (WebException ex)
607 { 607 {
608 m_log.InfoFormat("[WorldMap] Bad send on GetMapItems {0}", ex.Message); 608 m_log.InfoFormat("[WorldMap] Bad send on GetMapItems {0}", ex.Message);
609 responseMap["connect"] = OSD.FromBoolean(false); 609 responseMap["connect"] = LLSD.FromBoolean(false);
610 lock (m_blacklistedurls) 610 lock (m_blacklistedurls)
611 { 611 {
612 if (!m_blacklistedurls.ContainsKey(httpserver)) 612 if (!m_blacklistedurls.ContainsKey(httpserver))
@@ -630,12 +630,12 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
630 } 630 }
631 else 631 else
632 { 632 {
633 return new OSDMap(); 633 return new LLSDMap();
634 } 634 }
635 } 635 }
636 catch (WebException) 636 catch (WebException)
637 { 637 {
638 responseMap["connect"] = OSD.FromBoolean(false); 638 responseMap["connect"] = LLSD.FromBoolean(false);
639 lock (m_blacklistedurls) 639 lock (m_blacklistedurls)
640 { 640 {
641 if (!m_blacklistedurls.ContainsKey(httpserver)) 641 if (!m_blacklistedurls.ContainsKey(httpserver))
@@ -646,18 +646,18 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
646 646
647 return responseMap; 647 return responseMap;
648 } 648 }
649 OSD rezResponse = null; 649 LLSD rezResponse = null;
650 try 650 try
651 { 651 {
652 rezResponse = OSDParser.DeserializeLLSDXml(response_mapItems_reply); 652 rezResponse = LLSDParser.DeserializeXml(response_mapItems_reply);
653 653
654 responseMap = (OSDMap)rezResponse; 654 responseMap = (LLSDMap)rezResponse;
655 responseMap["requestID"] = OSD.FromUUID(requestID); 655 responseMap["requestID"] = LLSD.FromUUID(requestID);
656 } 656 }
657 catch (Exception) 657 catch (Exception)
658 { 658 {
659 //m_log.InfoFormat("[OGP]: exception on parse of rez reply {0}", ex.Message); 659 //m_log.InfoFormat("[OGP]: exception on parse of rez reply {0}", ex.Message);
660 responseMap["connect"] = OSD.FromBoolean(false); 660 responseMap["connect"] = LLSD.FromBoolean(false);
661 661
662 return responseMap; 662 return responseMap;
663 } 663 }
@@ -793,57 +793,57 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
793 return null; 793 return null;
794 } 794 }
795 795
796 public OSD HandleRemoteMapItemRequest(string path, OSD request, string endpoint) 796 public LLSD HandleRemoteMapItemRequest(string path, LLSD request, string endpoint)
797 { 797 {
798 uint xstart = 0; 798 uint xstart = 0;
799 uint ystart = 0; 799 uint ystart = 0;
800 800
801 Utils.LongToUInts(m_scene.RegionInfo.RegionHandle,out xstart,out ystart); 801 Helpers.LongToUInts(m_scene.RegionInfo.RegionHandle,out xstart,out ystart);
802 802
803 OSDMap responsemap = new OSDMap(); 803 LLSDMap responsemap = new LLSDMap();
804 List<ScenePresence> avatars = m_scene.GetAvatars(); 804 List<ScenePresence> avatars = m_scene.GetAvatars();
805 OSDArray responsearr = new OSDArray(avatars.Count); 805 LLSDArray responsearr = new LLSDArray(avatars.Count);
806 OSDMap responsemapdata = new OSDMap(); 806 LLSDMap responsemapdata = new LLSDMap();
807 int tc = System.Environment.TickCount; 807 int tc = System.Environment.TickCount;
808 /* 808 /*
809 foreach (ScenePresence av in avatars) 809 foreach (ScenePresence av in avatars)
810 { 810 {
811 responsemapdata = new OSDMap(); 811 responsemapdata = new LLSDMap();
812 responsemapdata["X"] = OSD.FromInteger((int)(xstart + av.AbsolutePosition.X)); 812 responsemapdata["X"] = LLSD.FromInteger((int)(xstart + av.AbsolutePosition.X));
813 responsemapdata["Y"] = OSD.FromInteger((int)(ystart + av.AbsolutePosition.Y)); 813 responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + av.AbsolutePosition.Y));
814 responsemapdata["ID"] = OSD.FromUUID(UUID.Zero); 814 responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero);
815 responsemapdata["Name"] = OSD.FromString("TH"); 815 responsemapdata["Name"] = LLSD.FromString("TH");
816 responsemapdata["Extra"] = OSD.FromInteger(0); 816 responsemapdata["Extra"] = LLSD.FromInteger(0);
817 responsemapdata["Extra2"] = OSD.FromInteger(0); 817 responsemapdata["Extra2"] = LLSD.FromInteger(0);
818 responsearr.Add(responsemapdata); 818 responsearr.Add(responsemapdata);
819 } 819 }
820 responsemap["1"] = responsearr; 820 responsemap["1"] = responsearr;
821 */ 821 */
822 if (avatars.Count == 0) 822 if (avatars.Count == 0)
823 { 823 {
824 responsemapdata = new OSDMap(); 824 responsemapdata = new LLSDMap();
825 responsemapdata["X"] = OSD.FromInteger((int)(xstart + 1)); 825 responsemapdata["X"] = LLSD.FromInteger((int)(xstart + 1));
826 responsemapdata["Y"] = OSD.FromInteger((int)(ystart + 1)); 826 responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + 1));
827 responsemapdata["ID"] = OSD.FromUUID(UUID.Zero); 827 responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero);
828 responsemapdata["Name"] = OSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString())); 828 responsemapdata["Name"] = LLSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString()));
829 responsemapdata["Extra"] = OSD.FromInteger(0); 829 responsemapdata["Extra"] = LLSD.FromInteger(0);
830 responsemapdata["Extra2"] = OSD.FromInteger(0); 830 responsemapdata["Extra2"] = LLSD.FromInteger(0);
831 responsearr.Add(responsemapdata); 831 responsearr.Add(responsemapdata);
832 832
833 responsemap["6"] = responsearr; 833 responsemap["6"] = responsearr;
834 } 834 }
835 else 835 else
836 { 836 {
837 responsearr = new OSDArray(avatars.Count); 837 responsearr = new LLSDArray(avatars.Count);
838 foreach (ScenePresence av in avatars) 838 foreach (ScenePresence av in avatars)
839 { 839 {
840 responsemapdata = new OSDMap(); 840 responsemapdata = new LLSDMap();
841 responsemapdata["X"] = OSD.FromInteger((int)(xstart + av.AbsolutePosition.X)); 841 responsemapdata["X"] = LLSD.FromInteger((int)(xstart + av.AbsolutePosition.X));
842 responsemapdata["Y"] = OSD.FromInteger((int)(ystart + av.AbsolutePosition.Y)); 842 responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + av.AbsolutePosition.Y));
843 responsemapdata["ID"] = OSD.FromUUID(UUID.Zero); 843 responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero);
844 responsemapdata["Name"] = OSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString())); 844 responsemapdata["Name"] = LLSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString()));
845 responsemapdata["Extra"] = OSD.FromInteger(1); 845 responsemapdata["Extra"] = LLSD.FromInteger(1);
846 responsemapdata["Extra2"] = OSD.FromInteger(0); 846 responsemapdata["Extra2"] = LLSD.FromInteger(0);
847 responsearr.Add(responsemapdata); 847 responsearr.Add(responsemapdata);
848 } 848 }
849 responsemap["6"] = responsearr; 849 responsemap["6"] = responsearr;