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.
0.6.0-stable
Charles Krinke 2008-09-06 23:08:08 +00:00
parent 3378b502c5
commit b85a29d1b8
1 changed files with 5 additions and 7 deletions

View File

@ -730,10 +730,10 @@ namespace OpenSim.Framework
// used for RemoteParcelRequest (for "About Landmark")
public static UUID BuildFakeParcelID(ulong regionHandle, uint x, uint y) {
byte[] bytes = {
(byte)(regionHandle >> 56), (byte)(regionHandle >> 48), (byte)(regionHandle >> 40), (byte)(regionHandle >> 32),
(byte)(regionHandle >> 24), (byte)(regionHandle >> 16), (byte)(regionHandle >> 8), (byte)regionHandle,
(byte)(x >> 24), (byte)(x >> 16), (byte)(x >> 8), (byte)x,
(byte)(y >> 24), (byte)(y >> 16), (byte)(y >> 8), (byte)y };
(byte)regionHandle, (byte)(regionHandle >> 8), (byte)(regionHandle >> 16), (byte)(regionHandle >> 24),
(byte)(regionHandle >> 32), (byte)(regionHandle >> 40), (byte)(regionHandle >> 48), (byte)(regionHandle << 56),
(byte)x, (byte)(x >> 8), (byte)(x >> 16), (byte)(x >> 24),
(byte)y, (byte)(y >> 8), (byte)(y >> 16), (byte)(y >> 24) };
return new UUID(bytes, 0);
}
@ -741,9 +741,7 @@ namespace OpenSim.Framework
byte[] bytes = parcelID.GetBytes();
regionHandle = Helpers.BytesToUInt64(bytes);
x = Helpers.BytesToUInt(bytes, 8);
// grrr. I'd like to use that code in the next line, but libsl has an off-by-one bug here and returns 0.
//uint y = Helpers.BytesToUInt(bytes, 12);
y = (uint)((bytes[12] << 24) | (bytes[13] << 16) | (bytes[14] << 8) | bytes[15]);
y = Helpers.BytesToUInt(bytes, 12);
}
}
}