* Massive cleanup of LLClientView, removed a few hundred unnecessary value initialisers, etc.

0.6.0-stable
Adam Frisby 2008-11-01 22:34:04 +00:00
parent 84136c70d8
commit 4c24b1bc9b
1 changed files with 2663 additions and 2695 deletions

View File

@ -28,7 +28,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Net; using System.Net;
using System.Net.Sockets;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
@ -40,7 +39,6 @@ using log4net;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Statistics; using OpenSim.Framework.Statistics;
using OpenSim.Region.ClientStack.LindenUDP;
using OpenSim.Region.Interfaces; using OpenSim.Region.Interfaces;
using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Scenes;
using Timer = System.Timers.Timer; using Timer = System.Timers.Timer;
@ -63,39 +61,39 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// } // }
/* static variables */ /* static variables */
public static SynchronizeClientHandler SynchronizeClient = null; public static SynchronizeClientHandler SynchronizeClient;
/* private variables */ /* private variables */
private readonly UUID m_sessionId; private readonly UUID m_sessionId;
private UUID m_secureSessionId = UUID.Zero; private readonly UUID m_secureSessionId = UUID.Zero;
//private AgentAssetUpload UploadAssets; //private AgentAssetUpload UploadAssets;
private int m_debugPacketLevel = 0; private int m_debugPacketLevel;
private readonly AssetCache m_assetCache; private readonly AssetCache m_assetCache;
// private InventoryCache m_inventoryCache; // private InventoryCache m_inventoryCache;
private int m_cachedTextureSerial = 0; private int m_cachedTextureSerial;
private Timer m_clientPingTimer; private Timer m_clientPingTimer;
private bool m_clientBlocked = false; private bool m_clientBlocked;
private int m_probesWithNoIngressPackets = 0; private int m_probesWithNoIngressPackets;
//private int m_lastPacketsReceived = 0; //private int m_lastPacketsReceived = 0;
//private byte[] ZeroOutBuffer = new byte[4096]; //private byte[] ZeroOutBuffer = new byte[4096];
private readonly UUID m_agentId; private readonly UUID m_agentId;
private readonly uint m_circuitCode; private readonly uint m_circuitCode;
private int m_moneyBalance; private int m_moneyBalance;
private IPacketHandler m_PacketHandler; private readonly IPacketHandler m_PacketHandler;
private int m_animationSequenceNumber = 1; private int m_animationSequenceNumber = 1;
private byte[] m_channelVersion = Utils.StringToBytes("OpenSimulator Server"); // Dummy value needed by libSL private readonly byte[] m_channelVersion = Utils.StringToBytes("OpenSimulator Server"); // Dummy value needed by libSL
private Dictionary<string, UUID> m_defaultAnimations = new Dictionary<string, UUID>(); private readonly Dictionary<string, UUID> m_defaultAnimations = new Dictionary<string, UUID>();
private bool m_SendLogoutPacketWhenClosing = true; private bool m_SendLogoutPacketWhenClosing = true;
private int m_inPacketsChecked = 0; private int m_inPacketsChecked;
/* protected variables */ /* protected variables */
@ -117,163 +115,163 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected EndPoint m_proxyEndPoint; protected EndPoint m_proxyEndPoint;
protected UUID m_activeGroupID = UUID.Zero; protected UUID m_activeGroupID = UUID.Zero;
protected string m_activeGroupName = String.Empty; protected string m_activeGroupName = String.Empty;
protected ulong m_activeGroupPowers = 0; protected ulong m_activeGroupPowers;
protected Dictionary<UUID,ulong> m_groupPowers = new Dictionary<UUID, ulong>(); protected Dictionary<UUID,ulong> m_groupPowers = new Dictionary<UUID, ulong>();
/* Instantiated Designated Event Delegates */ /* Instantiated Designated Event Delegates */
//- used so we don't create new objects for each incoming packet and then toss it out later */ //- used so we don't create new objects for each incoming packet and then toss it out later */
private GenericMessage handlerGenericMessage = null; private GenericMessage handlerGenericMessage;
private RequestAvatarProperties handlerRequestAvatarProperties = null; //OnRequestAvatarProperties; private RequestAvatarProperties handlerRequestAvatarProperties; //OnRequestAvatarProperties;
private UpdateAvatarProperties handlerUpdateAvatarProperties = null; // OnUpdateAvatarProperties; private UpdateAvatarProperties handlerUpdateAvatarProperties; // OnUpdateAvatarProperties;
private ChatMessage handlerChatFromClient = null; //OnChatFromClient; private ChatMessage handlerChatFromClient; //OnChatFromClient;
private ChatMessage handlerChatFromClient2 = null; //OnChatFromClient; private ChatMessage handlerChatFromClient2; //OnChatFromClient;
private ImprovedInstantMessage handlerInstantMessage = null; //OnInstantMessage; private ImprovedInstantMessage handlerInstantMessage; //OnInstantMessage;
private FriendActionDelegate handlerApproveFriendRequest = null; //OnApproveFriendRequest; private FriendActionDelegate handlerApproveFriendRequest; //OnApproveFriendRequest;
private FriendshipTermination handlerTerminateFriendship = null; //OnTerminateFriendship; private FriendshipTermination handlerTerminateFriendship; //OnTerminateFriendship;
private RezObject handlerRezObject = null; //OnRezObject; private RezObject handlerRezObject; //OnRezObject;
private DeRezObject handlerDeRezObject = null; //OnDeRezObject; private DeRezObject handlerDeRezObject; //OnDeRezObject;
private ModifyTerrain handlerModifyTerrain = null; private ModifyTerrain handlerModifyTerrain;
private BakeTerrain handlerBakeTerrain = null; private BakeTerrain handlerBakeTerrain;
private EstateChangeInfo handlerEstateChangeInfo = null; private EstateChangeInfo handlerEstateChangeInfo;
private Action<IClientAPI> handlerRegionHandShakeReply = null; //OnRegionHandShakeReply; private Action<IClientAPI> handlerRegionHandShakeReply; //OnRegionHandShakeReply;
private GenericCall2 handlerRequestWearables = null; //OnRequestWearables; private GenericCall2 handlerRequestWearables; //OnRequestWearables;
private Action<IClientAPI> handlerRequestAvatarsData = null; //OnRequestAvatarsData; private Action<IClientAPI> handlerRequestAvatarsData; //OnRequestAvatarsData;
private SetAppearance handlerSetAppearance = null; //OnSetAppearance; private SetAppearance handlerSetAppearance; //OnSetAppearance;
private AvatarNowWearing handlerAvatarNowWearing = null; //OnAvatarNowWearing; private AvatarNowWearing handlerAvatarNowWearing; //OnAvatarNowWearing;
private RezSingleAttachmentFromInv handlerRezSingleAttachment = null; //OnRezSingleAttachmentFromInv; private RezSingleAttachmentFromInv handlerRezSingleAttachment; //OnRezSingleAttachmentFromInv;
private UUIDNameRequest handlerDetachAttachmentIntoInv = null; // Detach attachment! private UUIDNameRequest handlerDetachAttachmentIntoInv; // Detach attachment!
private ObjectAttach handlerObjectAttach = null; //OnObjectAttach; private ObjectAttach handlerObjectAttach; //OnObjectAttach;
private SetAlwaysRun handlerSetAlwaysRun = null; //OnSetAlwaysRun; private SetAlwaysRun handlerSetAlwaysRun; //OnSetAlwaysRun;
private GenericCall2 handlerCompleteMovementToRegion = null; //OnCompleteMovementToRegion; private GenericCall2 handlerCompleteMovementToRegion; //OnCompleteMovementToRegion;
private UpdateAgent handlerAgentUpdate = null; //OnAgentUpdate; private UpdateAgent handlerAgentUpdate; //OnAgentUpdate;
private StartAnim handlerStartAnim = null; private StartAnim handlerStartAnim;
private StopAnim handlerStopAnim = null; private StopAnim handlerStopAnim;
private AgentRequestSit handlerAgentRequestSit = null; //OnAgentRequestSit; private AgentRequestSit handlerAgentRequestSit; //OnAgentRequestSit;
private AgentSit handlerAgentSit = null; //OnAgentSit; private AgentSit handlerAgentSit; //OnAgentSit;
private AvatarPickerRequest handlerAvatarPickerRequest = null; //OnAvatarPickerRequest; private AvatarPickerRequest handlerAvatarPickerRequest; //OnAvatarPickerRequest;
private FetchInventory handlerAgentDataUpdateRequest = null; //OnAgentDataUpdateRequest; private FetchInventory handlerAgentDataUpdateRequest; //OnAgentDataUpdateRequest;
private FetchInventory handlerUserInfoRequest = null; //OnUserInfoRequest; private FetchInventory handlerUserInfoRequest; //OnUserInfoRequest;
private TeleportLocationRequest handlerSetStartLocationRequest = null; //OnSetStartLocationRequest; private TeleportLocationRequest handlerSetStartLocationRequest; //OnSetStartLocationRequest;
private TeleportLandmarkRequest handlerTeleportLandmarkRequest = null; //OnTeleportLandmarkRequest; private TeleportLandmarkRequest handlerTeleportLandmarkRequest; //OnTeleportLandmarkRequest;
private LinkObjects handlerLinkObjects = null; //OnLinkObjects; private LinkObjects handlerLinkObjects; //OnLinkObjects;
private DelinkObjects handlerDelinkObjects = null; //OnDelinkObjects; private DelinkObjects handlerDelinkObjects; //OnDelinkObjects;
private AddNewPrim handlerAddPrim = null; //OnAddPrim; private AddNewPrim handlerAddPrim; //OnAddPrim;
private UpdateShape handlerUpdatePrimShape = null; //null; private UpdateShape handlerUpdatePrimShape; //null;
private ObjectExtraParams handlerUpdateExtraParams = null; //OnUpdateExtraParams; private ObjectExtraParams handlerUpdateExtraParams; //OnUpdateExtraParams;
private ObjectDuplicate handlerObjectDuplicate = null; private ObjectDuplicate handlerObjectDuplicate;
private ObjectDuplicateOnRay handlerObjectDuplicateOnRay = null; private ObjectDuplicateOnRay handlerObjectDuplicateOnRay;
private ObjectSelect handlerObjectSelect = null; private ObjectSelect handlerObjectSelect;
private ObjectDeselect handlerObjectDeselect = null; private ObjectDeselect handlerObjectDeselect;
private ObjectIncludeInSearch handlerObjectIncludeInSearch = null; private ObjectIncludeInSearch handlerObjectIncludeInSearch;
private UpdatePrimFlags handlerUpdatePrimFlags = null; //OnUpdatePrimFlags; private UpdatePrimFlags handlerUpdatePrimFlags; //OnUpdatePrimFlags;
private UpdatePrimTexture handlerUpdatePrimTexture = null; private UpdatePrimTexture handlerUpdatePrimTexture;
private GrabObject handlerGrabObject = null; //OnGrabObject; private GrabObject handlerGrabObject; //OnGrabObject;
private MoveObject handlerGrabUpdate = null; //OnGrabUpdate; private MoveObject handlerGrabUpdate; //OnGrabUpdate;
private ObjectSelect handlerDeGrabObject = null; //OnDeGrabObject; private ObjectSelect handlerDeGrabObject; //OnDeGrabObject;
private GenericCall7 handlerObjectDescription = null; private GenericCall7 handlerObjectDescription;
private GenericCall7 handlerObjectName = null; private GenericCall7 handlerObjectName;
private GenericCall7 handlerObjectClickAction = null; private GenericCall7 handlerObjectClickAction;
private GenericCall7 handlerObjectMaterial = null; private GenericCall7 handlerObjectMaterial;
private ObjectPermissions handlerObjectPermissions = null; private ObjectPermissions handlerObjectPermissions;
private RequestObjectPropertiesFamily handlerRequestObjectPropertiesFamily = null; //OnRequestObjectPropertiesFamily; private RequestObjectPropertiesFamily handlerRequestObjectPropertiesFamily; //OnRequestObjectPropertiesFamily;
private TextureRequest handlerTextureRequest = null; private TextureRequest handlerTextureRequest;
private UDPAssetUploadRequest handlerAssetUploadRequest = null; //OnAssetUploadRequest; private UDPAssetUploadRequest handlerAssetUploadRequest; //OnAssetUploadRequest;
private RequestXfer handlerRequestXfer = null; //OnRequestXfer; private RequestXfer handlerRequestXfer; //OnRequestXfer;
private XferReceive handlerXferReceive = null; //OnXferReceive; private XferReceive handlerXferReceive; //OnXferReceive;
private ConfirmXfer handlerConfirmXfer = null; //OnConfirmXfer; private ConfirmXfer handlerConfirmXfer; //OnConfirmXfer;
private CreateInventoryFolder handlerCreateInventoryFolder = null; //OnCreateNewInventoryFolder; private CreateInventoryFolder handlerCreateInventoryFolder; //OnCreateNewInventoryFolder;
private UpdateInventoryFolder handlerUpdateInventoryFolder = null; private UpdateInventoryFolder handlerUpdateInventoryFolder;
private MoveInventoryFolder handlerMoveInventoryFolder = null; private MoveInventoryFolder handlerMoveInventoryFolder;
private CreateNewInventoryItem handlerCreateNewInventoryItem = null; //OnCreateNewInventoryItem; private CreateNewInventoryItem handlerCreateNewInventoryItem; //OnCreateNewInventoryItem;
private FetchInventory handlerFetchInventory = null; private FetchInventory handlerFetchInventory;
private FetchInventoryDescendents handlerFetchInventoryDescendents = null; //OnFetchInventoryDescendents; private FetchInventoryDescendents handlerFetchInventoryDescendents; //OnFetchInventoryDescendents;
private PurgeInventoryDescendents handlerPurgeInventoryDescendents = null; //OnPurgeInventoryDescendents; private PurgeInventoryDescendents handlerPurgeInventoryDescendents; //OnPurgeInventoryDescendents;
private UpdateInventoryItem handlerUpdateInventoryItem = null; private UpdateInventoryItem handlerUpdateInventoryItem;
private CopyInventoryItem handlerCopyInventoryItem = null; private CopyInventoryItem handlerCopyInventoryItem;
private MoveInventoryItem handlerMoveInventoryItem = null; private MoveInventoryItem handlerMoveInventoryItem;
private RemoveInventoryItem handlerRemoveInventoryItem = null; private RemoveInventoryItem handlerRemoveInventoryItem;
private RemoveInventoryFolder handlerRemoveInventoryFolder = null; private RemoveInventoryFolder handlerRemoveInventoryFolder;
private RequestTaskInventory handlerRequestTaskInventory = null; //OnRequestTaskInventory; private RequestTaskInventory handlerRequestTaskInventory; //OnRequestTaskInventory;
private UpdateTaskInventory handlerUpdateTaskInventory = null; //OnUpdateTaskInventory; private UpdateTaskInventory handlerUpdateTaskInventory; //OnUpdateTaskInventory;
private MoveTaskInventory handlerMoveTaskItem = null; private MoveTaskInventory handlerMoveTaskItem;
private RemoveTaskInventory handlerRemoveTaskItem = null; //OnRemoveTaskItem; private RemoveTaskInventory handlerRemoveTaskItem; //OnRemoveTaskItem;
private RezScript handlerRezScript = null; //OnRezScript; private RezScript handlerRezScript; //OnRezScript;
private RequestMapBlocks handlerRequestMapBlocks = null; //OnRequestMapBlocks; private RequestMapBlocks handlerRequestMapBlocks; //OnRequestMapBlocks;
private RequestMapName handlerMapNameRequest = null; //OnMapNameRequest; private RequestMapName handlerMapNameRequest; //OnMapNameRequest;
private TeleportLocationRequest handlerTeleportLocationRequest = null; //OnTeleportLocationRequest; private TeleportLocationRequest handlerTeleportLocationRequest; //OnTeleportLocationRequest;
private MoneyBalanceRequest handlerMoneyBalanceRequest = null; //OnMoneyBalanceRequest; private MoneyBalanceRequest handlerMoneyBalanceRequest; //OnMoneyBalanceRequest;
private UUIDNameRequest handlerNameRequest = null; private UUIDNameRequest handlerNameRequest;
private ParcelAccessListRequest handlerParcelAccessListRequest = null; //OnParcelAccessListRequest; private ParcelAccessListRequest handlerParcelAccessListRequest; //OnParcelAccessListRequest;
private ParcelAccessListUpdateRequest handlerParcelAccessListUpdateRequest = null; //OnParcelAccessListUpdateRequest; private ParcelAccessListUpdateRequest handlerParcelAccessListUpdateRequest; //OnParcelAccessListUpdateRequest;
private ParcelPropertiesRequest handlerParcelPropertiesRequest = null; //OnParcelPropertiesRequest; private ParcelPropertiesRequest handlerParcelPropertiesRequest; //OnParcelPropertiesRequest;
private ParcelDivideRequest handlerParcelDivideRequest = null; //OnParcelDivideRequest; private ParcelDivideRequest handlerParcelDivideRequest; //OnParcelDivideRequest;
private ParcelJoinRequest handlerParcelJoinRequest = null; //OnParcelJoinRequest; private ParcelJoinRequest handlerParcelJoinRequest; //OnParcelJoinRequest;
private ParcelPropertiesUpdateRequest handlerParcelPropertiesUpdateRequest = null; //OnParcelPropertiesUpdateRequest; private ParcelPropertiesUpdateRequest handlerParcelPropertiesUpdateRequest; //OnParcelPropertiesUpdateRequest;
private ParcelSelectObjects handlerParcelSelectObjects = null; //OnParcelSelectObjects; private ParcelSelectObjects handlerParcelSelectObjects; //OnParcelSelectObjects;
private ParcelObjectOwnerRequest handlerParcelObjectOwnerRequest = null; //OnParcelObjectOwnerRequest; private ParcelObjectOwnerRequest handlerParcelObjectOwnerRequest; //OnParcelObjectOwnerRequest;
private ParcelAbandonRequest handlerParcelAbandonRequest = null; private ParcelAbandonRequest handlerParcelAbandonRequest;
private ParcelGodForceOwner handlerParcelGodForceOwner = null; private ParcelGodForceOwner handlerParcelGodForceOwner;
private ParcelReclaim handlerParcelReclaim = null; private ParcelReclaim handlerParcelReclaim;
private ParcelReturnObjectsRequest handlerParcelReturnObjectsRequest = null; private ParcelReturnObjectsRequest handlerParcelReturnObjectsRequest;
private RegionInfoRequest handlerRegionInfoRequest = null; //OnRegionInfoRequest; private RegionInfoRequest handlerRegionInfoRequest; //OnRegionInfoRequest;
private EstateCovenantRequest handlerEstateCovenantRequest = null; //OnEstateCovenantRequest; private EstateCovenantRequest handlerEstateCovenantRequest; //OnEstateCovenantRequest;
private RequestGodlikePowers handlerReqGodlikePowers = null; //OnRequestGodlikePowers; private RequestGodlikePowers handlerReqGodlikePowers; //OnRequestGodlikePowers;
private GodKickUser handlerGodKickUser = null; //OnGodKickUser; private GodKickUser handlerGodKickUser; //OnGodKickUser;
private ViewerEffectEventHandler handlerViewerEffect = null; //OnViewerEffect; private ViewerEffectEventHandler handlerViewerEffect; //OnViewerEffect;
private Action<IClientAPI> handlerLogout = null; //OnLogout; private Action<IClientAPI> handlerLogout; //OnLogout;
private MoneyTransferRequest handlerMoneyTransferRequest = null; //OnMoneyTransferRequest; private MoneyTransferRequest handlerMoneyTransferRequest; //OnMoneyTransferRequest;
private ParcelBuy handlerParcelBuy = null; private ParcelBuy handlerParcelBuy;
private EconomyDataRequest handlerEconomoyDataRequest = null; private EconomyDataRequest handlerEconomoyDataRequest;
private UpdateVector handlerUpdatePrimSinglePosition = null; //OnUpdatePrimSinglePosition; private UpdateVector handlerUpdatePrimSinglePosition; //OnUpdatePrimSinglePosition;
private UpdatePrimSingleRotation handlerUpdatePrimSingleRotation = null; //OnUpdatePrimSingleRotation; private UpdatePrimSingleRotation handlerUpdatePrimSingleRotation; //OnUpdatePrimSingleRotation;
private UpdateVector handlerUpdatePrimScale = null; //OnUpdatePrimScale; private UpdateVector handlerUpdatePrimScale; //OnUpdatePrimScale;
private UpdateVector handlerUpdatePrimGroupScale = null; //OnUpdateGroupScale; private UpdateVector handlerUpdatePrimGroupScale; //OnUpdateGroupScale;
private UpdateVector handlerUpdateVector = null; //OnUpdatePrimGroupPosition; private UpdateVector handlerUpdateVector; //OnUpdatePrimGroupPosition;
private UpdatePrimRotation handlerUpdatePrimRotation = null; //OnUpdatePrimGroupRotation; private UpdatePrimRotation handlerUpdatePrimRotation; //OnUpdatePrimGroupRotation;
// private UpdatePrimGroupRotation handlerUpdatePrimGroupRotation = null; //OnUpdatePrimGroupMouseRotation; // private UpdatePrimGroupRotation handlerUpdatePrimGroupRotation; //OnUpdatePrimGroupMouseRotation;
// private RequestAsset handlerRequestAsset = null; // OnRequestAsset; // private RequestAsset handlerRequestAsset; // OnRequestAsset;
private UUIDNameRequest handlerTeleportHomeRequest = null; private UUIDNameRequest handlerTeleportHomeRequest;
private RegionHandleRequest handlerRegionHandleRequest = null; // OnRegionHandleRequest private RegionHandleRequest handlerRegionHandleRequest; // OnRegionHandleRequest
private ParcelInfoRequest handlerParcelInfoRequest = null; // OnParcelInfoRequest private ParcelInfoRequest handlerParcelInfoRequest; // OnParcelInfoRequest
private ScriptAnswer handlerScriptAnswer = null; private ScriptAnswer handlerScriptAnswer;
private RequestPayPrice handlerRequestPayPrice = null; private RequestPayPrice handlerRequestPayPrice;
private ObjectSaleInfo handlerObjectSaleInfo = null; private ObjectSaleInfo handlerObjectSaleInfo;
private ObjectBuy handlerObjectBuy = null; private ObjectBuy handlerObjectBuy;
//private BuyObjectInventory handlerBuyObjectInventory = null; //private BuyObjectInventory handlerBuyObjectInventory;
private ObjectDeselect handlerObjectDetach = null; private ObjectDeselect handlerObjectDetach;
private ObjectDrop handlerObjectDrop = null; private ObjectDrop handlerObjectDrop;
private AgentSit handlerOnUndo = null; private AgentSit handlerOnUndo;
private ForceReleaseControls handlerForceReleaseControls = null; private ForceReleaseControls handlerForceReleaseControls;
private GodLandStatRequest handlerLandStatRequest = null; private GodLandStatRequest handlerLandStatRequest;
private UUIDNameRequest handlerUUIDGroupNameRequest = null; private UUIDNameRequest handlerUUIDGroupNameRequest;
private RequestObjectPropertiesFamily handlerObjectGroupRequest = null; private RequestObjectPropertiesFamily handlerObjectGroupRequest;
private ScriptReset handlerScriptReset = null; private ScriptReset handlerScriptReset;
private GetScriptRunning handlerGetScriptRunning = null; private GetScriptRunning handlerGetScriptRunning;
private SetScriptRunning handlerSetScriptRunning = null; private SetScriptRunning handlerSetScriptRunning;
private UpdateVector handlerAutoPilotGo = null; private UpdateVector handlerAutoPilotGo;
//Gesture //Gesture
private ActivateGesture handlerActivateGesture = null; private ActivateGesture handlerActivateGesture;
private DeactivateGesture handlerDeactivateGesture = null; private DeactivateGesture handlerDeactivateGesture;
private ObjectOwner handlerObjectOwner = null; private ObjectOwner handlerObjectOwner;
private DirPlacesQuery handlerDirPlacesQuery = null; private DirPlacesQuery handlerDirPlacesQuery;
private DirFindQuery handlerDirFindQuery = null; private DirFindQuery handlerDirFindQuery;
private DirLandQuery handlerDirLandQuery = null; private DirLandQuery handlerDirLandQuery;
private DirPopularQuery handlerDirPopularQuery = null; private DirPopularQuery handlerDirPopularQuery;
private DirClassifiedQuery handlerDirClassifiedQuery = null; private DirClassifiedQuery handlerDirClassifiedQuery;
private ParcelSetOtherCleanTime handlerParcelSetOtherCleanTime = null; private ParcelSetOtherCleanTime handlerParcelSetOtherCleanTime;
private MapItemRequest handlerMapItemRequest = null; private MapItemRequest handlerMapItemRequest;
private IGroupsModule m_GroupsModule = null; private IGroupsModule m_GroupsModule;
//private TerrainUnacked handlerUnackedTerrain = null; //private TerrainUnacked handlerUnackedTerrain = null;
@ -399,15 +397,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <summary> /// <summary>
/// Constructor /// Constructor
/// </summary> /// </summary>
/// <param name="remoteEP"></param>
/// <param name="scene"></param>
/// <param name="assetCache"></param>
/// <param name="packServer"></param>
/// <param name="authenSessions"></param>
/// <param name="agentId"></param>
/// <param name="sessionId"></param>
/// <param name="circuitCode"></param>
/// <param name="proxyEP"></param>
public LLClientView( public LLClientView(
EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer, EndPoint remoteEP, IScene scene, AssetCache assetCache, LLPacketServer packServer,
AuthenticateResponse sessionInfo, UUID agentId, UUID sessionId, uint circuitCode, EndPoint proxyEP, AuthenticateResponse sessionInfo, UUID agentId, UUID sessionId, uint circuitCode, EndPoint proxyEP,
@ -451,7 +440,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
RegisterLocalPacketHandlers(); RegisterLocalPacketHandlers();
m_clientThread = new Thread(new ThreadStart(Start)); m_clientThread = new Thread(Start);
m_clientThread.Name = "ClientThread"; m_clientThread.Name = "ClientThread";
m_clientThread.IsBackground = true; m_clientThread.IsBackground = true;
m_clientThread.Start(); m_clientThread.Start();
@ -645,7 +634,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
if (m_debugPacketLevel > 0) if (m_debugPacketLevel > 0)
{ {
string info = String.Empty; string info;
if (m_debugPacketLevel < 255 && packet.Type == PacketType.AgentUpdate) if (m_debugPacketLevel < 255 && packet.Type == PacketType.AgentUpdate)
return; return;
@ -699,7 +688,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
# endregion # endregion
protected int m_terrainCheckerCount = 0; protected int m_terrainCheckerCount;
/// <summary> /// <summary>
/// Event handler for check client timer /// Event handler for check client timer
@ -1002,10 +991,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
#region Scene/Avatar to Client #region Scene/Avatar to Client
/// <summary>
///
/// </summary>
/// <param name="regionInfo"></param>
public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args)
{ {
RegionHandshakePacket handshake = (RegionHandshakePacket)PacketPool.Instance.GetPacket(PacketType.RegionHandshake); RegionHandshakePacket handshake = (RegionHandshakePacket)PacketPool.Instance.GetPacket(PacketType.RegionHandshake);
@ -2050,8 +2035,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
ScriptDialogPacket dialog = (ScriptDialogPacket)PacketPool.Instance.GetPacket(PacketType.ScriptDialog); ScriptDialogPacket dialog = (ScriptDialogPacket)PacketPool.Instance.GetPacket(PacketType.ScriptDialog);
dialog.Data.ObjectID = objectID; dialog.Data.ObjectID = objectID;
dialog.Data.ObjectName = Utils.StringToBytes(objectname); dialog.Data.ObjectName = Utils.StringToBytes(objectname);
dialog.Data.FirstName = Utils.StringToBytes(this.FirstName); dialog.Data.FirstName = Utils.StringToBytes(FirstName);
dialog.Data.LastName = Utils.StringToBytes(this.LastName); dialog.Data.LastName = Utils.StringToBytes(LastName);
dialog.Data.Message = Utils.StringToBytes(msg); dialog.Data.Message = Utils.StringToBytes(msg);
dialog.Data.ImageID = textureID; dialog.Data.ImageID = textureID;
dialog.Data.ChatChannel = ch; dialog.Data.ChatChannel = ch;
@ -2519,11 +2504,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <param name="regionHandle"></param>
/// <param name="timeDilation"></param>
/// <param name="localID"></param>
/// <param name="position"></param>
/// <param name="rotation"></param>
public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position,
Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, UUID AssetId) Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, UUID AssetId)
{ {
@ -2709,7 +2689,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
#region Estate Data Sending Methods #region Estate Data Sending Methods
private bool convertParamStringToBool(byte[] field) private static bool convertParamStringToBool(byte[] field)
{ {
string s = Utils.BytesToString(field); string s = Utils.BytesToString(field);
if (s == "1" || s.ToLower() == "y" || s.ToLower() == "yes" || s.ToLower() == "t" || s.ToLower() == "true") if (s == "1" || s.ToLower() == "y" || s.ToLower() == "yes" || s.ToLower() == "t" || s.ToLower() == "true")
@ -2723,7 +2703,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket();
packet.AgentData.TransactionID = UUID.Random(); packet.AgentData.TransactionID = UUID.Random();
packet.AgentData.AgentID = this.AgentId; packet.AgentData.AgentID = AgentId;
packet.AgentData.SessionID = this.SessionId; packet.AgentData.SessionID = this.SessionId;
packet.MethodData.Invoice = invoice; packet.MethodData.Invoice = invoice;
packet.MethodData.Method = Utils.StringToBytes("setaccess"); packet.MethodData.Method = Utils.StringToBytes("setaccess");
@ -2766,7 +2746,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket();
packet.AgentData.TransactionID = UUID.Random(); packet.AgentData.TransactionID = UUID.Random();
packet.AgentData.AgentID = this.AgentId; packet.AgentData.AgentID = AgentId;
packet.AgentData.SessionID = this.SessionId; packet.AgentData.SessionID = this.SessionId;
packet.MethodData.Invoice = invoice; packet.MethodData.Invoice = invoice;
packet.MethodData.Method = Utils.StringToBytes("setaccess"); packet.MethodData.Method = Utils.StringToBytes("setaccess");
@ -2799,7 +2779,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
RegionInfoPacket rinfopack = new RegionInfoPacket(); RegionInfoPacket rinfopack = new RegionInfoPacket();
RegionInfoPacket.RegionInfoBlock rinfoblk = new RegionInfoPacket.RegionInfoBlock(); RegionInfoPacket.RegionInfoBlock rinfoblk = new RegionInfoPacket.RegionInfoBlock();
rinfopack.AgentData.AgentID = this.AgentId; rinfopack.AgentData.AgentID = AgentId;
rinfopack.AgentData.SessionID = this.SessionId; rinfopack.AgentData.SessionID = this.SessionId;
rinfoblk.BillableFactor = args.billableFactor; rinfoblk.BillableFactor = args.billableFactor;
rinfoblk.EstateID = args.estateID; rinfoblk.EstateID = args.estateID;
@ -2974,7 +2954,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID) public void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID)
{ {
ParcelAccessListReplyPacket replyPacket = (ParcelAccessListReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelAccessListReply); ParcelAccessListReplyPacket replyPacket = (ParcelAccessListReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelAccessListReply);
replyPacket.Data.AgentID = this.AgentId; replyPacket.Data.AgentID = AgentId;
replyPacket.Data.Flags = accessFlag; replyPacket.Data.Flags = accessFlag;
replyPacket.Data.LocalID = localLandID; replyPacket.Data.LocalID = localLandID;
replyPacket.Data.SequenceID = 0; replyPacket.Data.SequenceID = 0;
@ -3580,8 +3560,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
if (nod.Attributes["name"] != null) if (nod.Attributes["name"] != null)
{ {
string name = (string)nod.Attributes["name"].Value.ToLower(); string name = nod.Attributes["name"].Value.ToLower();
string id = (string)nod.InnerText; string id = nod.InnerText;
m_defaultAnimations.Add(name, (UUID)id); m_defaultAnimations.Add(name, (UUID)id);
} }
} }
@ -3687,8 +3667,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
else else
{ {
// UUID partId = part.UUID; // UUID partId = part.UUID;
UpdatePrimRotation handlerUpdatePrimRotation = OnUpdatePrimGroupRotation; UpdatePrimRotation handlerUpdatePrimRotation;
UpdatePrimGroupRotation handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation; UpdatePrimGroupRotation handlerUpdatePrimGroupRotation;
switch (block.Type) switch (block.Type)
{ {
@ -3856,7 +3836,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/* /*
IList simMapProfiles = m_gridServer.RequestMapBlocks(minX, minY, maxX, maxY); IList simMapProfiles = m_gridServer.RequestMapBlocks(minX, minY, maxX, maxY);
MapBlockReplyPacket mbReply = new MapBlockReplyPacket(); MapBlockReplyPacket mbReply = new MapBlockReplyPacket();
mbReply.AgentData.AgentId = this.AgentId; mbReply.AgentData.AgentId = AgentId;
int len; int len;
if (simMapProfiles == null) if (simMapProfiles == null)
len = 0; len = 0;
@ -3933,11 +3913,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
SendMoneyBalance(UUID.Zero, true, Utils.StringToBytes("Poof Poof!"), m_moneyBalance); SendMoneyBalance(UUID.Zero, true, Utils.StringToBytes("Poof Poof!"), m_moneyBalance);
return true; return true;
} }
else
{
return false; return false;
} }
}
/// <summary> /// <summary>
/// Breaks down the genericMessagePacket into specific events /// Breaks down the genericMessagePacket into specific events
@ -3950,16 +3927,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
switch (gmMethod) switch (gmMethod)
{ {
case "autopilot": case "autopilot":
float locx = 0f; float locx;
float locy = 0f; float locy;
float locz = 0f; float locz;
uint regionX = 0; uint regionX;
uint regionY = 0; uint regionY;
try try
{ {
Helpers.LongToUInts(Scene.RegionInfo.RegionHandle, out regionX, out regionY); Helpers.LongToUInts(Scene.RegionInfo.RegionHandle, out regionX, out regionY);
locx = Convert.ToSingle(Utils.BytesToString(gmParams[0].Parameter)) - (float)regionX; locx = Convert.ToSingle(Utils.BytesToString(gmParams[0].Parameter)) - regionX;
locy = Convert.ToSingle(Utils.BytesToString(gmParams[1].Parameter)) - (float)regionY; locy = Convert.ToSingle(Utils.BytesToString(gmParams[1].Parameter)) - regionY;
locz = Convert.ToSingle(Utils.BytesToString(gmParams[2].Parameter)); locz = Convert.ToSingle(Utils.BytesToString(gmParams[2].Parameter));
} }
catch (InvalidCastException) catch (InvalidCastException)
@ -3978,10 +3955,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
break; break;
default: default:
m_log.Debug("[CLIENT]: Unknown Generic Message, Method: " + gmMethod + ". Invoice: " + gmInvoice.ToString() + ". Dumping Params:"); m_log.Debug("[CLIENT]: Unknown Generic Message, Method: " + gmMethod + ". Invoice: " + gmInvoice + ". Dumping Params:");
for (int hi = 0; hi < gmParams.Length; hi++) for (int hi = 0; hi < gmParams.Length; hi++)
{ {
System.Console.WriteLine(gmParams[hi].ToString()); Console.WriteLine(gmParams[hi].ToString());
} }
//gmpack.MethodData. //gmpack.MethodData.
break; break;
@ -4002,8 +3979,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
//there is a handler registered that handled this packet type //there is a handler registered that handled this packet type
return; return;
} }
else
{
// Main packet processing conditional // Main packet processing conditional
switch (Pack.Type) switch (Pack.Type)
{ {
@ -4201,7 +4176,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
modify.ModifyBlock.BrushSize, modify.ModifyBlock.BrushSize,
modify.ModifyBlock.Action, modify.ParcelData[i].North, modify.ModifyBlock.Action, modify.ParcelData[i].North,
modify.ParcelData[i].West, modify.ParcelData[i].South, modify.ParcelData[i].West, modify.ParcelData[i].South,
modify.ParcelData[i].East, this.AgentId); modify.ParcelData[i].East, AgentId);
} }
} }
} }
@ -5006,12 +4981,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// //
if (transfer.TransferInfo.SourceType == 3) if (transfer.TransferInfo.SourceType == 3)
{ {
UUID taskID = UUID.Zero; UUID taskID = new UUID(transfer.TransferInfo.Params, 48);
UUID itemID = UUID.Zero; UUID itemID = new UUID(transfer.TransferInfo.Params, 64);
UUID requestID = UUID.Zero; UUID requestID = new UUID(transfer.TransferInfo.Params, 80);
taskID = new UUID(transfer.TransferInfo.Params, 48);
itemID = new UUID(transfer.TransferInfo.Params, 64);
requestID = new UUID(transfer.TransferInfo.Params, 80);
if (!(((Scene)m_scene).ExternalChecks.ExternalChecksBypassPermissions())) if (!(((Scene)m_scene).ExternalChecks.ExternalChecksBypassPermissions()))
{ {
if (taskID != UUID.Zero) // Prim if (taskID != UUID.Zero) // Prim
@ -5479,7 +5451,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
item.SalePrice = rezScriptx.InventoryBlock.SalePrice; item.SalePrice = rezScriptx.InventoryBlock.SalePrice;
item.Name = Util.FieldToString(rezScriptx.InventoryBlock.Name); item.Name = Util.FieldToString(rezScriptx.InventoryBlock.Name);
item.Description = Util.FieldToString(rezScriptx.InventoryBlock.Description); item.Description = Util.FieldToString(rezScriptx.InventoryBlock.Description);
item.CreationDate = (int)rezScriptx.InventoryBlock.CreationDate; item.CreationDate = rezScriptx.InventoryBlock.CreationDate;
if (handlerRezScript != null) if (handlerRezScript != null)
{ {
@ -5502,7 +5474,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
break; break;
case PacketType.MapNameRequest: case PacketType.MapNameRequest:
MapNameRequestPacket map = (MapNameRequestPacket)Pack; MapNameRequestPacket map = (MapNameRequestPacket)Pack;
string mapName = UTF8Encoding.UTF8.GetString(map.NameData.Name, 0, string mapName = Encoding.UTF8.GetString(map.NameData.Name, 0,
map.NameData.Name.Length - 1); map.NameData.Name.Length - 1);
handlerMapNameRequest = OnMapNameRequest; handlerMapNameRequest = OnMapNameRequest;
if (handlerMapNameRequest != null) if (handlerMapNameRequest != null)
@ -5547,7 +5519,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerTeleportHomeRequest = OnTeleportHomeRequest; handlerTeleportHomeRequest = OnTeleportHomeRequest;
if (handlerTeleportHomeRequest != null) if (handlerTeleportHomeRequest != null)
{ {
handlerTeleportHomeRequest(this.AgentId, this); handlerTeleportHomeRequest(AgentId, this);
} }
break; break;
} }
@ -5808,13 +5780,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
switch (Utils.BytesToString(messagePacket.MethodData.Method)) switch (Utils.BytesToString(messagePacket.MethodData.Method))
{ {
case "getinfo": case "getinfo":
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
{ {
OnDetailedEstateDataRequest(this, messagePacket.MethodData.Invoice); OnDetailedEstateDataRequest(this, messagePacket.MethodData.Invoice);
} }
break; break;
case "setregioninfo": case "setregioninfo":
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
{ {
OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter), OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter),
convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter), convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter),
@ -5827,7 +5799,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
break; break;
// case "texturebase": // case "texturebase":
// if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) // if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
// { // {
// foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) // foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
// { // {
@ -5842,7 +5814,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// } // }
// break; // break;
case "texturedetail": case "texturedetail":
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
{ {
foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
{ {
@ -5860,7 +5832,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
break; break;
case "textureheights": case "textureheights":
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
{ {
foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
{ {
@ -5881,7 +5853,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OnCommitEstateTerrainTextureRequest(this); OnCommitEstateTerrainTextureRequest(this);
break; break;
case "setregionterrain": case "setregionterrain":
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
{ {
if (messagePacket.ParamList.Length != 9) if (messagePacket.ParamList.Length != 9)
{ {
@ -5891,8 +5863,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
try try
{ {
string tmp; string tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter);
tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter);
if (!tmp.Contains(".")) tmp += ".00"; if (!tmp.Contains(".")) tmp += ".00";
float WaterHeight = (float)Convert.ToDecimal(tmp); float WaterHeight = (float)Convert.ToDecimal(tmp);
tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter); tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter);
@ -5913,19 +5884,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
catch (Exception ex) catch (Exception ex)
{ {
m_log.Error("EstateOwnerMessage: Exception while setting terrain settings: \n" + messagePacket.ToString() + "\n" + ex.ToString()); m_log.Error("EstateOwnerMessage: Exception while setting terrain settings: \n" + messagePacket + "\n" + ex);
} }
} }
} }
break; break;
case "restart": case "restart":
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
{ {
// There's only 1 block in the estateResetSim.. and that's the number of seconds till restart. // There's only 1 block in the estateResetSim.. and that's the number of seconds till restart.
foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
{ {
float timeSeconds = 0; float timeSeconds;
Utils.TryParseSingle(Utils.BytesToString(block.Parameter), out timeSeconds); Utils.TryParseSingle(Utils.BytesToString(block.Parameter), out timeSeconds);
timeSeconds = (int)timeSeconds; timeSeconds = (int)timeSeconds;
OnEstateRestartSimRequest(this, (int)timeSeconds); OnEstateRestartSimRequest(this, (int)timeSeconds);
@ -5934,7 +5905,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
break; break;
case "estatechangecovenantid": case "estatechangecovenantid":
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
{ {
foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList) foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
{ {
@ -5944,7 +5915,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
break; break;
case "estateaccessdelta": // Estate access delta manages the banlist and allow list too. case "estateaccessdelta": // Estate access delta manages the banlist and allow list too.
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
{ {
int estateAccessType = Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[1].Parameter)); int estateAccessType = Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[1].Parameter));
OnUpdateEstateAccessDeltaRequest(this, messagePacket.MethodData.Invoice, estateAccessType, new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter))); OnUpdateEstateAccessDeltaRequest(this, messagePacket.MethodData.Invoice, estateAccessType, new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter)));
@ -5952,7 +5923,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
break; break;
case "simulatormessage": case "simulatormessage":
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
{ {
UUID invoice = messagePacket.MethodData.Invoice; UUID invoice = messagePacket.MethodData.Invoice;
UUID SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter)); UUID SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter));
@ -5963,7 +5934,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
break; break;
case "instantmessage": case "instantmessage":
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
{ {
if (messagePacket.ParamList.Length < 5) if (messagePacket.ParamList.Length < 5)
break; break;
@ -5976,7 +5947,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
break; break;
case "setregiondebug": case "setregiondebug":
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
{ {
UUID invoice = messagePacket.MethodData.Invoice; UUID invoice = messagePacket.MethodData.Invoice;
UUID SenderID = messagePacket.AgentData.AgentID; UUID SenderID = messagePacket.AgentData.AgentID;
@ -5988,11 +5959,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
break; break;
case "teleporthomeuser": case "teleporthomeuser":
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
{ {
UUID invoice = messagePacket.MethodData.Invoice; UUID invoice = messagePacket.MethodData.Invoice;
UUID SenderID = messagePacket.AgentData.AgentID; UUID SenderID = messagePacket.AgentData.AgentID;
UUID Prey = UUID.Zero; UUID Prey;
UUID.TryParse(Utils.BytesToString(messagePacket.ParamList[1].Parameter), out Prey); UUID.TryParse(Utils.BytesToString(messagePacket.ParamList[1].Parameter), out Prey);
@ -6000,7 +5971,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
break; break;
case "teleporthomeallusers": case "teleporthomeallusers":
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
{ {
UUID invoice = messagePacket.MethodData.Invoice; UUID invoice = messagePacket.MethodData.Invoice;
UUID SenderID = messagePacket.AgentData.AgentID; UUID SenderID = messagePacket.AgentData.AgentID;
@ -6022,7 +5993,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
break; break;
case "terrain": case "terrain":
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
{ {
handlerBakeTerrain = OnBakeTerrain; handlerBakeTerrain = OnBakeTerrain;
if (handlerBakeTerrain != null) if (handlerBakeTerrain != null)
@ -6033,7 +6004,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
break; break;
case "estatechangeinfo": case "estatechangeinfo":
if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(this.AgentId, false)) if (((Scene)m_scene).ExternalChecks.ExternalChecksCanIssueEstateCommand(AgentId, false))
{ {
UUID invoice = messagePacket.MethodData.Invoice; UUID invoice = messagePacket.MethodData.Invoice;
UUID SenderID = messagePacket.AgentData.AgentID; UUID SenderID = messagePacket.AgentData.AgentID;
@ -6049,7 +6020,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
break; break;
default: default:
m_log.Error("EstateOwnerMessage: Unknown method requested\n" + messagePacket.ToString()); m_log.Error("EstateOwnerMessage: Unknown method requested\n" + messagePacket);
break; break;
} }
break; break;
@ -6773,7 +6744,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(createGroupReply, ThrottleOutPacketType.Task); OutPacket(createGroupReply, ThrottleOutPacketType.Task);
// Sync with event queue // Sync with event queue
System.Threading.Thread.Sleep(1000); Thread.Sleep(1000);
m_GroupsModule.SendAgentGroupDataUpdate(this); m_GroupsModule.SendAgentGroupDataUpdate(this);
} }
@ -6916,12 +6887,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
break; break;
default: default:
m_log.Warn("[CLIENT]: unhandled packet " + Pack.ToString()); m_log.Warn("[CLIENT]: unhandled packet " + Pack);
break; break;
#endregion #endregion
} }
}
PacketPool.Instance.ReturnPacket(Pack); PacketPool.Instance.ReturnPacket(Pack);
} }
@ -6967,7 +6937,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void SendBlueBoxMessage(UUID FromAvatarID, UUID fromSessionID, String FromAvatarName, String Message) public void SendBlueBoxMessage(UUID FromAvatarID, UUID fromSessionID, String FromAvatarName, String Message)
{ {
if (!ChildAgentStatus()) if (!ChildAgentStatus())
SendInstantMessage(FromAvatarID, fromSessionID, Message, AgentId, SessionId, FromAvatarName, (byte)1, (uint)Util.UnixTimeSinceEpoch()); SendInstantMessage(FromAvatarID, fromSessionID, Message, AgentId, SessionId, FromAvatarName, 1, (uint)Util.UnixTimeSinceEpoch());
//SendInstantMessage(FromAvatarID, fromSessionID, Message, AgentId, SessionId, FromAvatarName, (byte)21,(uint) Util.UnixTimeSinceEpoch()); //SendInstantMessage(FromAvatarID, fromSessionID, Message, AgentId, SessionId, FromAvatarName, (byte)21,(uint) Util.UnixTimeSinceEpoch());
} }
@ -7145,7 +7115,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
Transfer.TransferInfo.Params = new byte[20]; Transfer.TransferInfo.Params = new byte[20];
Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16); Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16);
int assType = (int)req.AssetInf.Type; int assType = req.AssetInf.Type;
Array.Copy(Helpers.IntToBytes(assType), 0, Transfer.TransferInfo.Params, 16, 4); Array.Copy(Helpers.IntToBytes(assType), 0, Transfer.TransferInfo.Params, 16, 4);
} }
else if (req.AssetRequestSource == 3) else if (req.AssetRequestSource == 3)
@ -7155,7 +7125,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
//Array.Copy(req.RequestUser.AgentId.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16); //Array.Copy(req.RequestUser.AgentId.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16);
//Array.Copy(req.RequestUser.SessionId.GetBytes(), 0, Transfer.TransferInfo.Params, 16, 16); //Array.Copy(req.RequestUser.SessionId.GetBytes(), 0, Transfer.TransferInfo.Params, 16, 16);
} }
Transfer.TransferInfo.Size = (int)req.AssetInf.Data.Length; Transfer.TransferInfo.Size = req.AssetInf.Data.Length;
Transfer.TransferInfo.TransferID = req.TransferRequestID; Transfer.TransferInfo.TransferID = req.TransferRequestID;
Transfer.Header.Zerocoded = true; Transfer.Header.Zerocoded = true;
OutPacket(Transfer, ThrottleOutPacketType.Asset); OutPacket(Transfer, ThrottleOutPacketType.Asset);
@ -7217,8 +7187,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
ClientInfo info = m_PacketHandler.GetClientInfo(); ClientInfo info = m_PacketHandler.GetClientInfo();
info.userEP = this.m_userEndPoint; info.userEP = m_userEndPoint;
info.proxyEP = this.m_proxyEndPoint; info.proxyEP = m_proxyEndPoint;
info.agentcircuit = new sAgentCircuitData(RequestClientInfo()); info.agentcircuit = new sAgentCircuitData(RequestClientInfo());
return info; return info;
@ -7234,7 +7204,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time) public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time)
{ {
ParcelMediaCommandMessagePacket commandMessagePacket = new ParcelMediaCommandMessagePacket(); ParcelMediaCommandMessagePacket commandMessagePacket = new ParcelMediaCommandMessagePacket();
commandMessagePacket.CommandBlock.Flags = (uint) flags; commandMessagePacket.CommandBlock.Flags = flags;
commandMessagePacket.CommandBlock.Command =(uint) command; commandMessagePacket.CommandBlock.Command =(uint) command;
commandMessagePacket.CommandBlock.Time = time; commandMessagePacket.CommandBlock.Time = time;
@ -7348,7 +7318,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
switch (option) switch (option)
{ {
case "ReliableIsImportant": case "ReliableIsImportant":
bool val = false; bool val;
if (bool.TryParse(value, out val)) if (bool.TryParse(value, out val))
m_PacketHandler.ReliableIsImportant = val; m_PacketHandler.ReliableIsImportant = val;
@ -7594,7 +7564,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
packet.EventData.Name = Utils.StringToBytes(data.name); packet.EventData.Name = Utils.StringToBytes(data.name);
packet.EventData.Category = Utils.StringToBytes(data.category); packet.EventData.Category = Utils.StringToBytes(data.category);
packet.EventData.Desc = Utils.StringToBytes(data.description); packet.EventData.Desc = Utils.StringToBytes(data.description);
packet.EventData.Date = Utils.StringToBytes(data.date.ToString()); packet.EventData.Date = Utils.StringToBytes(data.date);
packet.EventData.DateUTC = data.dateUTC; packet.EventData.DateUTC = data.dateUTC;
packet.EventData.Duration = data.duration; packet.EventData.Duration = data.duration;
packet.EventData.Cover = data.cover; packet.EventData.Cover = data.cover;
@ -7671,8 +7641,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data) public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data)
{ {
int i;
AvatarGroupsReplyPacket p = (AvatarGroupsReplyPacket)PacketPool.Instance.GetPacket(PacketType.AvatarGroupsReply); AvatarGroupsReplyPacket p = (AvatarGroupsReplyPacket)PacketPool.Instance.GetPacket(PacketType.AvatarGroupsReply);
p.AgentData = new AvatarGroupsReplyPacket.AgentDataBlock(); p.AgentData = new AvatarGroupsReplyPacket.AgentDataBlock();
@ -7680,7 +7648,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
p.AgentData.AvatarID = avatarID; p.AgentData.AvatarID = avatarID;
p.GroupData = new AvatarGroupsReplyPacket.GroupDataBlock[data.Length]; p.GroupData = new AvatarGroupsReplyPacket.GroupDataBlock[data.Length];
i = 0; int i = 0;
foreach (GroupMembershipData m in data) foreach (GroupMembershipData m in data)
{ {
p.GroupData[i] = new AvatarGroupsReplyPacket.GroupDataBlock(); p.GroupData[i] = new AvatarGroupsReplyPacket.GroupDataBlock();