* Updates libOMV to version 0.7.0

* Uses mantis #3811 as a base (thanks jhuliman) with changes.
* E-mail regarding interface changes sent to the opensim-dev list 
* Archive: https://lists.berlios.de/pipermail/opensim-dev/2009-July/007219.html
This commit is contained in:
Teravus Ovares
2009-07-25 15:49:10 +00:00
parent 98687df56b
commit 64bd9a3354
34 changed files with 23561 additions and 88 deletions

View File

@@ -36,14 +36,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// </summary>
class KillPacket : Packet
{
private Header header;
public override int Length
{
get { return 0; }
}
public override void FromBytes(Header header, byte[] bytes, ref int i, ref int packetEnd, byte[] zeroBuffer)
public override void FromBytes(Header header, byte[] bytes, ref int i, ref int packetEnd)
{
}
@@ -51,26 +49,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
}
public override Header Header { get { return header; } set { header = value; }}
public override byte[] ToBytes()
{
return new byte[0];
}
public override byte[][] ToBytesMultiple()
{
return new byte[][] { new byte[0] };
}
public KillPacket()
{
Header = new LowHeader();
Type = PacketType.UseCircuitCode;
Header = new Header();
Header.Frequency = OpenMetaverse.PacketFrequency.Low;
Header.ID = 65531;
Header.Reliable = true;
}
public override PacketType Type
{
get
{
return PacketType.UseCircuitCode;
}
}
}
}

View File

@@ -45,6 +45,7 @@ using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Services.Interfaces;
using Timer=System.Timers.Timer;
using AssetLandmark = OpenSim.Framework.AssetLandmark;
using Nini.Config;
namespace OpenSim.Region.ClientStack.LindenUDP
@@ -1266,7 +1267,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args)
{
RegionHandshakePacket handshake = (RegionHandshakePacket)PacketPool.Instance.GetPacket(PacketType.RegionHandshake);
handshake.RegionInfo = new RegionHandshakePacket.RegionInfoBlock();
handshake.RegionInfo.BillableFactor = args.billableFactor;
handshake.RegionInfo.IsEstateManager = args.isEstateManager;
handshake.RegionInfo.TerrainHeightRange00 = args.terrainHeightRange0;
@@ -1292,14 +1293,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handshake.RegionInfo.TerrainDetail2 = args.terrainDetail2;
handshake.RegionInfo.TerrainDetail3 = args.terrainDetail3;
handshake.RegionInfo.CacheID = UUID.Random(); //I guess this is for the client to remember an old setting?
handshake.RegionInfo2 = new RegionHandshakePacket.RegionInfo2Block();
handshake.RegionInfo2.RegionID = regionInfo.RegionID;
handshake.RegionInfo3 = new RegionHandshakePacket.RegionInfo3Block();
handshake.RegionInfo3.CPUClassID = 9;
handshake.RegionInfo3.CPURatio = 1;
// handshake.RegionInfo3.ColoName = Utils.EmptyBytes;
// handshake.RegionInfo3.CPUClassID = 0;
// handshake.RegionInfo3.CPURatio = 0;
// handshake.RegionInfo3.ProductName = Utils.StringToBytes("OpenSim");
// handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes;
handshake.RegionInfo3.ColoName = Utils.EmptyBytes;
handshake.RegionInfo3.ProductName = Utils.EmptyBytes;
handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes;
OutPacket(handshake, ThrottleOutPacketType.Task);
}
@@ -3551,8 +3554,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
rinfoblk.UseEstateSun = args.useEstateSun;
rinfoblk.WaterHeight = args.waterHeight;
rinfoblk.SimName = Utils.StringToBytes(args.simName);
rinfopack.RegionInfo2 = new RegionInfoPacket.RegionInfo2Block();
rinfopack.RegionInfo2.HardMaxAgents = uint.MaxValue;
rinfopack.RegionInfo2.HardMaxObjects = uint.MaxValue;
rinfopack.RegionInfo2.MaxAgents32 = uint.MaxValue;
rinfopack.RegionInfo2.ProductName = Utils.EmptyBytes;
rinfopack.RegionInfo2.ProductSKU = Utils.EmptyBytes;
rinfopack.HasVariableBlocks = true;
rinfopack.RegionInfo = rinfoblk;
rinfopack.AgentData = new RegionInfoPacket.AgentDataBlock();
rinfopack.AgentData.AgentID = AgentId;
rinfopack.AgentData.SessionID = SessionId;
OutPacket(rinfopack, ThrottleOutPacketType.Task);
}
@@ -7536,7 +7551,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
LandUpdateArgs args = new LandUpdateArgs();
args.AuthBuyerID = parcelPropertiesPacket.ParcelData.AuthBuyerID;
args.Category = (Parcel.ParcelCategory)parcelPropertiesPacket.ParcelData.Category;
args.Category = (ParcelCategory)parcelPropertiesPacket.ParcelData.Category;
args.Desc = Utils.BytesToString(parcelPropertiesPacket.ParcelData.Desc);
args.GroupID = parcelPropertiesPacket.ParcelData.GroupID;
args.LandingType = parcelPropertiesPacket.ParcelData.LandingType;
@@ -10030,8 +10045,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// Bit 0: Mature, bit 7: on sale, other bits: no idea
reply.Data.Flags = (byte)(
((land.Flags & (uint)Parcel.ParcelFlags.MaturePublish) != 0 ? (1 << 0) : 0) +
((land.Flags & (uint)Parcel.ParcelFlags.ForSale) != 0 ? (1 << 7) : 0));
((land.Flags & (uint)ParcelFlags.MaturePublish) != 0 ? (1 << 0) : 0) +
((land.Flags & (uint)ParcelFlags.ForSale) != 0 ? (1 << 7) : 0));
Vector3 pos = land.UserLocation;
if (pos.Equals(Vector3.Zero))

View File

@@ -827,7 +827,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
sendbuffer.Length, SocketFlags.None, m_Client.CircuitCode);
}
}
catch (NullReferenceException)
catch (NullReferenceException n)
{
m_log.Debug("[PACKET] Detected reuse of a returned packet");
m_PacketQueue.Cancel(item.Sequence);