diff options
author | Justin Clarke Casey | 2008-11-17 21:00:34 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-11-17 21:00:34 +0000 |
commit | c25a0ea7923aa390d30b8eebdbca4e599edf9b0d (patch) | |
tree | 775133790681153be9edc6d640162271750a1fd0 /OpenSim/Region/Environment/Modules/World | |
parent | * minor: add interface version to 'show version' command output (diff) | |
download | opensim-SC_OLD-c25a0ea7923aa390d30b8eebdbca4e599edf9b0d.zip opensim-SC_OLD-c25a0ea7923aa390d30b8eebdbca4e599edf9b0d.tar.gz opensim-SC_OLD-c25a0ea7923aa390d30b8eebdbca4e599edf9b0d.tar.bz2 opensim-SC_OLD-c25a0ea7923aa390d30b8eebdbca4e599edf9b0d.tar.xz |
* Update libOMV to r2359. This is necessary for the progressive texture patch
* Update libopenjpeg as well for this patch.
* Appears to be okay on a very short sniff test
* Source code will be placed in opensim-libs shortly
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Land/LandObject.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs | 112 |
2 files changed, 58 insertions, 58 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs index 27c7014..197d5c2 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs | |||
@@ -369,7 +369,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
369 | List<ParcelManager.ParcelAccessEntry> toRemove = new List<ParcelManager.ParcelAccessEntry>(); | 369 | List<ParcelManager.ParcelAccessEntry> toRemove = new List<ParcelManager.ParcelAccessEntry>(); |
370 | foreach (ParcelManager.ParcelAccessEntry entry in newData.ParcelAccessList) | 370 | foreach (ParcelManager.ParcelAccessEntry entry in newData.ParcelAccessList) |
371 | { | 371 | { |
372 | if (entry.Flags == (AccessList) flags) | 372 | if (entry.Flags == (AccessList)flags) |
373 | { | 373 | { |
374 | toRemove.Add(entry); | 374 | toRemove.Add(entry); |
375 | } | 375 | } |
@@ -384,7 +384,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land | |||
384 | ParcelManager.ParcelAccessEntry temp = new ParcelManager.ParcelAccessEntry(); | 384 | ParcelManager.ParcelAccessEntry temp = new ParcelManager.ParcelAccessEntry(); |
385 | temp.AgentID = entry.AgentID; | 385 | temp.AgentID = entry.AgentID; |
386 | temp.Time = new DateTime(); //Pointless? Yes. | 386 | temp.Time = new DateTime(); //Pointless? Yes. |
387 | temp.Flags = (AccessList) flags; | 387 | temp.Flags = (AccessList)flags; |
388 | 388 | ||
389 | if (!newData.ParcelAccessList.Contains(temp)) | 389 | if (!newData.ParcelAccessList.Contains(temp)) |
390 | { | 390 | { |
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs index c51a314..8318cdc 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; | |||
48 | using OpenSim.Region.Environment.Types; | 48 | using OpenSim.Region.Environment.Types; |
49 | using Caps = OpenSim.Framework.Communications.Capabilities.Caps; | 49 | using Caps = OpenSim.Framework.Communications.Capabilities.Caps; |
50 | 50 | ||
51 | using LLSD = OpenMetaverse.StructuredData.LLSD; | 51 | using OSD = OpenMetaverse.StructuredData.OSD; |
52 | using LLSDMap = OpenMetaverse.StructuredData.LLSDMap; | 52 | using OSDMap = OpenMetaverse.StructuredData.OSDMap; |
53 | using LLSDArray = OpenMetaverse.StructuredData.LLSDArray; | 53 | using OSDArray = OpenMetaverse.StructuredData.OSDArray; |
54 | 54 | ||
55 | namespace OpenSim.Region.Environment.Modules.World.WorldMap | 55 | namespace 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(GetLLSDMapLayerResponse()); | 205 | mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse()); |
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(GetLLSDMapLayerResponse()); | 218 | mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse()); |
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 LLSDMapLayer GetLLSDMapLayerResponse() | 226 | protected static OSDMapLayer GetOSDMapLayerResponse() |
227 | { | 227 | { |
228 | LLSDMapLayer mapLayer = new LLSDMapLayer(); | 228 | OSDMapLayer mapLayer = new OSDMapLayer(); |
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 | Helpers.LongToUInts(m_scene.RegionInfo.RegionHandle, out xstart, out ystart); | 324 | Utils.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 | LLSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle); | 410 | OSDMap 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 LLSDMap Response for the mapitem</param> | 436 | /// <param name="response">The OSDMap Response for the mapitem</param> |
437 | private void RequestMapItemsCompleted(LLSDMap response) | 437 | private void RequestMapItemsCompleted(OSDMap 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 | LLSDArray itemarray = (LLSDArray)response[mrs.itemtype.ToString()]; | 463 | OSDArray itemarray = (OSDArray)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 | LLSDMap mapitem = (LLSDMap)itemarray[i]; | 466 | OSDMap mapitem = (OSDMap)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 LLSDMap RequestMapItemsAsync(string httpserver, UUID id, uint flags, | 520 | private OSDMap 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 LLSDMap(); | 531 | return new OSDMap(); |
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 LLSDMap(); | 572 | return new OSDMap(); |
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 | LLSDMap RAMap = new LLSDMap(); | 588 | OSDMap RAMap = new OSDMap(); |
589 | 589 | ||
590 | // string RAMapString = RAMap.ToString(); | 590 | // string RAMapString = RAMap.ToString(); |
591 | LLSD LLSDofRAMap = RAMap; // RENAME if this works | 591 | OSD LLSDofRAMap = RAMap; // RENAME if this works |
592 | 592 | ||
593 | byte[] buffer = LLSDParser.SerializeXmlBytes(LLSDofRAMap); | 593 | byte[] buffer = OSDParser.SerializeLLSDXmlBytes(LLSDofRAMap); |
594 | LLSDMap responseMap = new LLSDMap(); | 594 | OSDMap responseMap = new OSDMap(); |
595 | responseMap["requestID"] = LLSD.FromUUID(requestID); | 595 | responseMap["requestID"] = OSD.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"] = LLSD.FromBoolean(false); | 609 | responseMap["connect"] = OSD.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 LLSDMap(); | 633 | return new OSDMap(); |
634 | } | 634 | } |
635 | } | 635 | } |
636 | catch (WebException) | 636 | catch (WebException) |
637 | { | 637 | { |
638 | responseMap["connect"] = LLSD.FromBoolean(false); | 638 | responseMap["connect"] = OSD.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 | LLSD rezResponse = null; | 649 | OSD rezResponse = null; |
650 | try | 650 | try |
651 | { | 651 | { |
652 | rezResponse = LLSDParser.DeserializeXml(response_mapItems_reply); | 652 | rezResponse = OSDParser.DeserializeLLSDXml(response_mapItems_reply); |
653 | 653 | ||
654 | responseMap = (LLSDMap)rezResponse; | 654 | responseMap = (OSDMap)rezResponse; |
655 | responseMap["requestID"] = LLSD.FromUUID(requestID); | 655 | responseMap["requestID"] = OSD.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"] = LLSD.FromBoolean(false); | 660 | responseMap["connect"] = OSD.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 LLSD HandleRemoteMapItemRequest(string path, LLSD request, string endpoint) | 796 | public OSD HandleRemoteMapItemRequest(string path, OSD request, string endpoint) |
797 | { | 797 | { |
798 | uint xstart = 0; | 798 | uint xstart = 0; |
799 | uint ystart = 0; | 799 | uint ystart = 0; |
800 | 800 | ||
801 | Helpers.LongToUInts(m_scene.RegionInfo.RegionHandle,out xstart,out ystart); | 801 | Utils.LongToUInts(m_scene.RegionInfo.RegionHandle,out xstart,out ystart); |
802 | 802 | ||
803 | LLSDMap responsemap = new LLSDMap(); | 803 | OSDMap responsemap = new OSDMap(); |
804 | List<ScenePresence> avatars = m_scene.GetAvatars(); | 804 | List<ScenePresence> avatars = m_scene.GetAvatars(); |
805 | LLSDArray responsearr = new LLSDArray(avatars.Count); | 805 | OSDArray responsearr = new OSDArray(avatars.Count); |
806 | LLSDMap responsemapdata = new LLSDMap(); | 806 | OSDMap responsemapdata = new OSDMap(); |
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 LLSDMap(); | 811 | responsemapdata = new OSDMap(); |
812 | responsemapdata["X"] = LLSD.FromInteger((int)(xstart + av.AbsolutePosition.X)); | 812 | responsemapdata["X"] = OSD.FromInteger((int)(xstart + av.AbsolutePosition.X)); |
813 | responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + av.AbsolutePosition.Y)); | 813 | responsemapdata["Y"] = OSD.FromInteger((int)(ystart + av.AbsolutePosition.Y)); |
814 | responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero); | 814 | responsemapdata["ID"] = OSD.FromUUID(UUID.Zero); |
815 | responsemapdata["Name"] = LLSD.FromString("TH"); | 815 | responsemapdata["Name"] = OSD.FromString("TH"); |
816 | responsemapdata["Extra"] = LLSD.FromInteger(0); | 816 | responsemapdata["Extra"] = OSD.FromInteger(0); |
817 | responsemapdata["Extra2"] = LLSD.FromInteger(0); | 817 | responsemapdata["Extra2"] = OSD.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 LLSDMap(); | 824 | responsemapdata = new OSDMap(); |
825 | responsemapdata["X"] = LLSD.FromInteger((int)(xstart + 1)); | 825 | responsemapdata["X"] = OSD.FromInteger((int)(xstart + 1)); |
826 | responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + 1)); | 826 | responsemapdata["Y"] = OSD.FromInteger((int)(ystart + 1)); |
827 | responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero); | 827 | responsemapdata["ID"] = OSD.FromUUID(UUID.Zero); |
828 | responsemapdata["Name"] = LLSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString())); | 828 | responsemapdata["Name"] = OSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString())); |
829 | responsemapdata["Extra"] = LLSD.FromInteger(0); | 829 | responsemapdata["Extra"] = OSD.FromInteger(0); |
830 | responsemapdata["Extra2"] = LLSD.FromInteger(0); | 830 | responsemapdata["Extra2"] = OSD.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 LLSDArray(avatars.Count); | 837 | responsearr = new OSDArray(avatars.Count); |
838 | foreach (ScenePresence av in avatars) | 838 | foreach (ScenePresence av in avatars) |
839 | { | 839 | { |
840 | responsemapdata = new LLSDMap(); | 840 | responsemapdata = new OSDMap(); |
841 | responsemapdata["X"] = LLSD.FromInteger((int)(xstart + av.AbsolutePosition.X)); | 841 | responsemapdata["X"] = OSD.FromInteger((int)(xstart + av.AbsolutePosition.X)); |
842 | responsemapdata["Y"] = LLSD.FromInteger((int)(ystart + av.AbsolutePosition.Y)); | 842 | responsemapdata["Y"] = OSD.FromInteger((int)(ystart + av.AbsolutePosition.Y)); |
843 | responsemapdata["ID"] = LLSD.FromUUID(UUID.Zero); | 843 | responsemapdata["ID"] = OSD.FromUUID(UUID.Zero); |
844 | responsemapdata["Name"] = LLSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString())); | 844 | responsemapdata["Name"] = OSD.FromString(Util.Md5Hash(m_scene.RegionInfo.RegionName + tc.ToString())); |
845 | responsemapdata["Extra"] = LLSD.FromInteger(1); | 845 | responsemapdata["Extra"] = OSD.FromInteger(1); |
846 | responsemapdata["Extra2"] = LLSD.FromInteger(0); | 846 | responsemapdata["Extra2"] = OSD.FromInteger(0); |
847 | responsearr.Add(responsemapdata); | 847 | responsearr.Add(responsemapdata); |
848 | } | 848 | } |
849 | responsemap["6"] = responsearr; | 849 | responsemap["6"] = responsearr; |