aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorCharles Krinke2008-09-06 23:08:08 +0000
committerCharles Krinke2008-09-06 23:08:08 +0000
commitb85a29d1b8d7e50361a3cbb5bfd2350ef11cbfea (patch)
treeacf5f599f89c27f4b8b1f6f1df7644e6f03d4b3b /OpenSim/Framework
parent* This changes gridcomms types back to our home grown wholy controlled types. (diff)
downloadopensim-SC_OLD-b85a29d1b8d7e50361a3cbb5bfd2350ef11cbfea.zip
opensim-SC_OLD-b85a29d1b8d7e50361a3cbb5bfd2350ef11cbfea.tar.gz
opensim-SC_OLD-b85a29d1b8d7e50361a3cbb5bfd2350ef11cbfea.tar.bz2
opensim-SC_OLD-b85a29d1b8d7e50361a3cbb5bfd2350ef11cbfea.tar.xz
Mantis#2136. Thank you kindly, HomerHorwitz for a patch that:
libomv corrected the endianess of some Helper methods, which broke the fake parcelID computation for "About Landmark". The attached patch fixes this.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Util.cs12
1 files changed, 5 insertions, 7 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index d7dcf19..de42bf8 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -730,10 +730,10 @@ namespace OpenSim.Framework
730 // used for RemoteParcelRequest (for "About Landmark") 730 // used for RemoteParcelRequest (for "About Landmark")
731 public static UUID BuildFakeParcelID(ulong regionHandle, uint x, uint y) { 731 public static UUID BuildFakeParcelID(ulong regionHandle, uint x, uint y) {
732 byte[] bytes = { 732 byte[] bytes = {
733 (byte)(regionHandle >> 56), (byte)(regionHandle >> 48), (byte)(regionHandle >> 40), (byte)(regionHandle >> 32), 733 (byte)regionHandle, (byte)(regionHandle >> 8), (byte)(regionHandle >> 16), (byte)(regionHandle >> 24),
734 (byte)(regionHandle >> 24), (byte)(regionHandle >> 16), (byte)(regionHandle >> 8), (byte)regionHandle, 734 (byte)(regionHandle >> 32), (byte)(regionHandle >> 40), (byte)(regionHandle >> 48), (byte)(regionHandle << 56),
735 (byte)(x >> 24), (byte)(x >> 16), (byte)(x >> 8), (byte)x, 735 (byte)x, (byte)(x >> 8), (byte)(x >> 16), (byte)(x >> 24),
736 (byte)(y >> 24), (byte)(y >> 16), (byte)(y >> 8), (byte)y }; 736 (byte)y, (byte)(y >> 8), (byte)(y >> 16), (byte)(y >> 24) };
737 return new UUID(bytes, 0); 737 return new UUID(bytes, 0);
738 } 738 }
739 739
@@ -741,9 +741,7 @@ namespace OpenSim.Framework
741 byte[] bytes = parcelID.GetBytes(); 741 byte[] bytes = parcelID.GetBytes();
742 regionHandle = Helpers.BytesToUInt64(bytes); 742 regionHandle = Helpers.BytesToUInt64(bytes);
743 x = Helpers.BytesToUInt(bytes, 8); 743 x = Helpers.BytesToUInt(bytes, 8);
744 // grrr. I'd like to use that code in the next line, but libsl has an off-by-one bug here and returns 0. 744 y = Helpers.BytesToUInt(bytes, 12);
745 //uint y = Helpers.BytesToUInt(bytes, 12);
746 y = (uint)((bytes[12] << 24) | (bytes[13] << 16) | (bytes[14] << 8) | bytes[15]);
747 } 745 }
748 } 746 }
749} 747}