From 9be1c0ff448d4ea650ca921937905653b4017d61 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Tue, 7 Sep 2010 14:41:13 -0700 Subject: * Cache null account responses in the SimianUserAccountServiceConnector to avoid repeated requests for missing avatar IDs * Updated to OpenMetaverse r3442 to fix a timezone issue with ExpiringCache --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 6 +++--- OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 9cdc80b..0925222 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -3529,9 +3529,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP private void ProcessEntityUpdates(int maxUpdates) { - Lazy> objectUpdateBlocks = new Lazy>(); - Lazy> compressedUpdateBlocks = new Lazy>(); - Lazy> terseUpdateBlocks = new Lazy>(); + OpenMetaverse.Lazy> objectUpdateBlocks = new OpenMetaverse.Lazy>(); + OpenMetaverse.Lazy> compressedUpdateBlocks = new OpenMetaverse.Lazy>(); + OpenMetaverse.Lazy> terseUpdateBlocks = new OpenMetaverse.Lazy>(); if (maxUpdates <= 0) maxUpdates = Int32.MaxValue; int updatesThisCall = 0; diff --git a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs index e43f7cf..194c064 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs @@ -140,13 +140,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP { // Process all the pending adds OutgoingPacket pendingAdd; - while (m_pendingAdds.Dequeue(out pendingAdd)) + while (m_pendingAdds.TryDequeue(out pendingAdd)) m_packets[pendingAdd.SequenceNumber] = pendingAdd; // Process all the pending removes, including updating statistics and round-trip times PendingAck pendingRemove; OutgoingPacket ackedPacket; - while (m_pendingRemoves.Dequeue(out pendingRemove)) + while (m_pendingRemoves.TryDequeue(out pendingRemove)) { if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket)) { -- cgit v1.1 From 0bebe94231c3b5aeaa24a0eeb38272a08b73473b Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Tue, 7 Sep 2010 15:45:33 -0700 Subject: Rolling back the recent libomv update but keeping the ExpiringCache cleanups (as much as is possible). There was a report of non-finite avatar positions after the update --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 6 +++--- OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 0925222..cdf8cb1 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -3529,9 +3529,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP private void ProcessEntityUpdates(int maxUpdates) { - OpenMetaverse.Lazy> objectUpdateBlocks = new OpenMetaverse.Lazy>(); - OpenMetaverse.Lazy> compressedUpdateBlocks = new OpenMetaverse.Lazy>(); - OpenMetaverse.Lazy> terseUpdateBlocks = new OpenMetaverse.Lazy>(); + OpenSim.Framework.Lazy> objectUpdateBlocks = new OpenSim.Framework.Lazy>(); + OpenSim.Framework.Lazy> compressedUpdateBlocks = new OpenSim.Framework.Lazy>(); + OpenSim.Framework.Lazy> terseUpdateBlocks = new OpenSim.Framework.Lazy>(); if (maxUpdates <= 0) maxUpdates = Int32.MaxValue; int updatesThisCall = 0; diff --git a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs index 194c064..e43f7cf 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs @@ -140,13 +140,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP { // Process all the pending adds OutgoingPacket pendingAdd; - while (m_pendingAdds.TryDequeue(out pendingAdd)) + while (m_pendingAdds.Dequeue(out pendingAdd)) m_packets[pendingAdd.SequenceNumber] = pendingAdd; // Process all the pending removes, including updating statistics and round-trip times PendingAck pendingRemove; OutgoingPacket ackedPacket; - while (m_pendingRemoves.TryDequeue(out pendingRemove)) + while (m_pendingRemoves.Dequeue(out pendingRemove)) { if (m_packets.TryGetValue(pendingRemove.SequenceNumber, out ackedPacket)) { -- cgit v1.1 From 47a5e2633c4a5cb5e0e89e4b8ffc42bf5996c4e6 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 11 Sep 2010 20:22:10 +0100 Subject: Prevent child agents from being blacklisted in the kill record. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index cdf8cb1..a6315a9 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -1519,10 +1519,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP kill.Header.Reliable = true; kill.Header.Zerocoded = true; - lock (m_entityUpdates.SyncRoot) + if (m_scene.GetScenePresence(localID) == null) { - m_killRecord.Add(localID); - OutPacket(kill, ThrottleOutPacketType.State); + lock (m_entityUpdates.SyncRoot) + { + m_killRecord.Add(localID); + OutPacket(kill, ThrottleOutPacketType.State); + } } } -- cgit v1.1 From f1f0bc23f4501ba99035283d3407ddad2b21b785 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Sun, 12 Sep 2010 13:43:49 -0400 Subject: Formatting cleanup. --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 261 ++++++++++----------- 1 file changed, 129 insertions(+), 132 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index a6315a9..f35691a 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -63,7 +63,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// Debug packet level. See OpenSim.RegisterConsoleCommands() for more details. /// protected int m_debugPacketLevel = 0; - + #region Events public event GenericMessage OnGenericMessage; @@ -287,7 +287,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP public event MuteListEntryRemove OnRemoveMuteListEntry; public event GodlikeMessage onGodlikeMessage; public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; - #endregion Events @@ -329,12 +328,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// ownerless phantom. /// /// All manipulation of this set has to occur under an m_entityUpdates.SyncRoot lock - /// + /// /// protected HashSet m_killRecord; - -// protected HashSet m_attachmentsSent; - + +// protected HashSet m_attachmentsSent; + private int m_moneyBalance; private int m_animationSequenceNumber = 1; private bool m_SendLogoutPacketWhenClosing = true; @@ -383,22 +382,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP public string ActiveGroupName { get { return m_activeGroupName; } } public ulong ActiveGroupPowers { get { return m_activeGroupPowers; } } public bool IsGroupMember(UUID groupID) { return m_groupPowers.ContainsKey(groupID); } - + /// /// First name of the agent/avatar represented by the client /// public string FirstName { get { return m_firstName; } } - + /// /// Last name of the agent/avatar represented by the client /// public string LastName { get { return m_lastName; } } - + /// /// Full name of the client (first name and last name) /// public string Name { get { return FirstName + " " + LastName; } } - + public uint CircuitCode { get { return m_circuitCode; } } public int MoneyBalance { get { return m_moneyBalance; } } public int NextAnimationSequenceNumber { get { return m_animationSequenceNumber++; } } @@ -440,7 +439,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_entityUpdates = new PriorityQueue(m_scene.Entities.Count); m_fullUpdateDataBlocksBuilder = new List(); m_killRecord = new HashSet(); -// m_attachmentsSent = new HashSet(); +// m_attachmentsSent = new HashSet(); m_assetService = m_scene.RequestModuleInterface(); m_GroupsModule = scene.RequestModuleInterface(); @@ -654,7 +653,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Make sure that we see any exception caused by the asynchronous operation. m_log.Error( string.Format("[LLCLIENTVIEW]: Caught exception while processing {0}", packetObject.Pack), e); - } + } } #endregion Packet Handling @@ -865,7 +864,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP foreach (GroupActiveProposals Proposal in Proposals) { GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); - + GAPIRP.AgentData.AgentID = AgentId; GAPIRP.AgentData.GroupID = groupID; GAPIRP.TransactionData.TransactionID = transactionID; @@ -889,7 +888,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (Proposals.Length == 0) { GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); - + GAPIRP.AgentData.AgentID = AgentId; GAPIRP.AgentData.GroupID = groupID; GAPIRP.TransactionData.TransactionID = transactionID; @@ -944,7 +943,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (Votes.Length == 0) { GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); - + GVHIRP.AgentData.AgentID = AgentId; GVHIRP.AgentData.GroupID = groupID; GVHIRP.TransactionData.TransactionID = transactionID; @@ -968,7 +967,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(GVHIRP, ThrottleOutPacketType.Task); } } - + public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) { GroupAccountDetailsReplyPacket GADRP = new GroupAccountDetailsReplyPacket(); @@ -987,13 +986,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP GADRP.HistoryData[0] = History; OutPacket(GADRP, ThrottleOutPacketType.Task); } - + public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) { GroupAccountSummaryReplyPacket GASRP = (GroupAccountSummaryReplyPacket)PacketPool.Instance.GetPacket( PacketType.GroupAccountSummaryReply); - + GASRP.AgentData = new GroupAccountSummaryReplyPacket.AgentDataBlock(); GASRP.AgentData.AgentID = sender.AgentId; GASRP.AgentData.GroupID = groupID; @@ -1020,13 +1019,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP GASRP.MoneyData.LightTaxEstimate = 0; OutPacket(GASRP, ThrottleOutPacketType.Task); } - + public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) { GroupAccountTransactionsReplyPacket GATRP = (GroupAccountTransactionsReplyPacket)PacketPool.Instance.GetPacket( PacketType.GroupAccountTransactionsReply); - + GATRP.AgentData = new GroupAccountTransactionsReplyPacket.AgentDataBlock(); GATRP.AgentData.AgentID = sender.AgentId; GATRP.AgentData.GroupID = groupID; @@ -1510,7 +1509,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void SendKillObject(ulong regionHandle, uint localID) { // m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, localID, regionHandle); - + KillObjectPacket kill = (KillObjectPacket)PacketPool.Instance.GetPacket(PacketType.KillObject); // TODO: don't create new blocks if recycling an old packet kill.ObjectData = new KillObjectPacket.ObjectDataBlock[1]; @@ -3469,9 +3468,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence); OutPacket(objupdate, ThrottleOutPacketType.Task); - + // We need to record the avatar local id since the root prim of an attachment points to this. -// m_attachmentsSent.Add(avatar.LocalId); +// m_attachmentsSent.Add(avatar.LocalId); } public void SendCoarseLocationUpdate(List users, List CoarseLocations) @@ -3519,7 +3518,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP #region Primitive Packet/Data Sending Methods /// - /// Generate one of the object update packets based on PrimUpdateFlags + /// Generate one of the object update packets based on PrimUpdateFlags /// and broadcast the packet to clients /// public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) @@ -3527,7 +3526,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP double priority = m_prioritizer.GetUpdatePriority(this, entity); lock (m_entityUpdates.SyncRoot) - m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags), entity.LocalId); + m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags), entity.LocalId); } private void ProcessEntityUpdates(int maxUpdates) @@ -3544,20 +3543,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP EntityUpdate update; while (updatesThisCall < maxUpdates && m_entityUpdates.TryDequeue(out update)) { - // Please do not remove this unless you can demonstrate on the OpenSim mailing list that a client + // Please do not remove this unless you can demonstrate on the OpenSim mailing list that a client // will never receive an update after a prim kill. Even then, keeping the kill record may be a good // safety measure. // - // Receiving updates after kills results in undeleteable prims that persist until relog and + // Receiving updates after kills results in undeleteable prims that persist until relog and // currently occurs because prims can be deleted before all queued updates are sent. if (m_killRecord.Contains(update.Entity.LocalId)) { // m_log.WarnFormat( -// "[CLIENT]: Preventing full update for prim with local id {0} after client for user {1} told it was deleted", -// update.Entity.LocalId, Name); +// "[CLIENT]: Preventing full update for prim with local id {0} after client for user {1} told it was deleted", +// update.Entity.LocalId, Name); continue; } - + if (update.Entity is SceneObjectPart) { SceneObjectPart part = (SceneObjectPart)update.Entity; @@ -3642,28 +3641,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP // string text = sop.Text; // if (text.IndexOf("\n") >= 0) // text = text.Remove(text.IndexOf("\n")); -// +// // if (m_attachmentsSent.Contains(sop.ParentID)) // { //// m_log.DebugFormat( //// "[CLIENT]: Sending full info about attached prim {0} text {1}", //// sop.LocalId, text); -// +// // objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock(sop, this.m_agentId)); -// +// // m_attachmentsSent.Add(sop.LocalId); // } // else // { // m_log.DebugFormat( -// "[CLIENT]: Requeueing full update of prim {0} text {1} since we haven't sent its parent {2} yet", +// "[CLIENT]: Requeueing full update of prim {0} text {1} since we haven't sent its parent {2} yet", // sop.LocalId, text, sop.ParentID); -// -// m_entityUpdates.Enqueue(double.MaxValue, update, sop.LocalId); +// +// m_entityUpdates.Enqueue(double.MaxValue, update, sop.LocalId); // } // } // else -// { +// { objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId)); // } } @@ -3977,7 +3976,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_propertiesPacketTimer.Stop(); return; } - + m_propertiesPacketTimer.Stop(); m_propertiesPacketTimer.Start(); } @@ -4208,7 +4207,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) { - ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage(); + ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage(); updateMessage.AABBMax = landData.AABBMax; updateMessage.AABBMin = landData.AABBMin; @@ -4252,7 +4251,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP updateMessage.PassHours = landData.PassHours; updateMessage.PassPrice = landData.PassPrice; updateMessage.PublicCount = 0; //TODO: Unimplemented - + updateMessage.RegionPushOverride = (regionFlags & (uint)RegionFlags.RestrictPushObject) > 0; updateMessage.RegionDenyAnonymous = (regionFlags & (uint)RegionFlags.DenyAnonymous) > 0; @@ -4282,13 +4281,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP updateMessage.UserLocation = landData.UserLocation; updateMessage.UserLookAt = landData.UserLookAt; - updateMessage.MediaType = landData.MediaType; - updateMessage.MediaDesc = landData.MediaDescription; - updateMessage.MediaWidth = landData.MediaWidth; - updateMessage.MediaHeight = landData.MediaHeight; - updateMessage.MediaLoop = landData.MediaLoop; - updateMessage.ObscureMusic = landData.ObscureMusic; - updateMessage.ObscureMedia = landData.ObscureMedia; + updateMessage.MediaType = landData.MediaType; + updateMessage.MediaDesc = landData.MediaDescription; + updateMessage.MediaWidth = landData.MediaWidth; + updateMessage.MediaHeight = landData.MediaHeight; + updateMessage.MediaLoop = landData.MediaLoop; + updateMessage.ObscureMusic = landData.ObscureMusic; + updateMessage.ObscureMedia = landData.ObscureMedia; try { @@ -4297,8 +4296,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP { eq.ParcelProperties(updateMessage, this.AgentId); } else { - m_log.Warn("No EQ Interface when sending parcel data."); - } + m_log.Warn("No EQ Interface when sending parcel data."); + } } catch (Exception ex) { @@ -4671,9 +4670,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP } // m_log.DebugFormat( -// "[LLCLIENTVIEW]: Constructing client update for part {0} {1} with flags {2}, localId {3}", +// "[LLCLIENTVIEW]: Constructing client update for part {0} {1} with flags {2}, localId {3}", // data.Name, update.FullID, flags, update.ID); - + update.UpdateFlags = (uint)flags; #endregion PrimFlags @@ -4806,11 +4805,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP AddLocalPacketHandler(PacketType.ObjectScale, HandleObjectScale); AddLocalPacketHandler(PacketType.ObjectRotation, HandleObjectRotation); AddLocalPacketHandler(PacketType.ObjectFlagUpdate, HandleObjectFlagUpdate); - + // Handle ObjectImage (TextureEntry) updates synchronously, since when updating multiple prim faces at once, // some clients will send out a separate ObjectImage packet for each face AddLocalPacketHandler(PacketType.ObjectImage, HandleObjectImage, false); - + AddLocalPacketHandler(PacketType.ObjectGrab, HandleObjectGrab, false); AddLocalPacketHandler(PacketType.ObjectGrabUpdate, HandleObjectGrabUpdate, false); AddLocalPacketHandler(PacketType.ObjectDeGrab, HandleObjectDeGrab); @@ -5065,12 +5064,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP return false; } - + private bool HandleParcelGodMarkAsContent(IClientAPI client, Packet Packet) { ParcelGodMarkAsContentPacket ParcelGodMarkAsContent = (ParcelGodMarkAsContentPacket)Packet; - + ParcelGodMark ParcelGodMarkAsContentHandler = OnParcelGodMark; if (ParcelGodMarkAsContentHandler != null) { @@ -5081,11 +5080,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleFreezeUser(IClientAPI client, Packet Packet) { FreezeUserPacket FreezeUser = (FreezeUserPacket)Packet; - + FreezeUserUpdate FreezeUserHandler = OnParcelFreezeUser; if (FreezeUserHandler != null) { @@ -5097,12 +5096,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleEjectUser(IClientAPI client, Packet Packet) { EjectUserPacket EjectUser = (EjectUserPacket)Packet; - + EjectUserUpdate EjectUserHandler = OnParcelEjectUser; if (EjectUserHandler != null) { @@ -5114,12 +5113,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleParcelBuyPass(IClientAPI client, Packet Packet) { ParcelBuyPassPacket ParcelBuyPass = (ParcelBuyPassPacket)Packet; - + ParcelBuyPass ParcelBuyPassHandler = OnParcelBuyPass; if (ParcelBuyPassHandler != null) { @@ -5130,7 +5129,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleParcelBuyRequest(IClientAPI sender, Packet Pack) { ParcelBuyPacket parcel = (ParcelBuyPacket)Pack; @@ -5352,7 +5351,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack; //m_log.DebugFormat("[CLIENT]: Received ScriptDialogReply from {0}", rdialog.Data.ObjectID); - + #region Packet Session and User Check if (m_checkPackets) { @@ -5498,12 +5497,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return true; } - + private bool HandleFindAgent(IClientAPI client, Packet Packet) { FindAgentPacket FindAgent = (FindAgentPacket)Packet; - + FindAgentUpdate FindAgentHandler = OnFindAgent; if (FindAgentHandler != null) { @@ -5512,12 +5511,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleTrackAgent(IClientAPI client, Packet Packet) { TrackAgentPacket TrackAgent = (TrackAgentPacket)Packet; - + TrackAgentUpdate TrackAgentHandler = OnTrackAgent; if (TrackAgentHandler != null) { @@ -5528,7 +5527,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandlerRezObject(IClientAPI sender, Packet Pack) { RezObjectPacket rezPacket = (RezObjectPacket)Pack; @@ -7184,19 +7183,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP UUID requestID = new UUID(transfer.TransferInfo.Params, 80); // m_log.DebugFormat( -// "[CLIENT]: Got request for asset {0} from item {1} in prim {2} by {3}", +// "[CLIENT]: Got request for asset {0} from item {1} in prim {2} by {3}", // requestID, itemID, taskID, Name); - + if (!(((Scene)m_scene).Permissions.BypassPermissions())) { if (taskID != UUID.Zero) // Prim { SceneObjectPart part = ((Scene)m_scene).GetSceneObjectPart(taskID); - + if (part == null) { m_log.WarnFormat( - "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but prim does not exist", + "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but prim does not exist", Name, requestID, itemID, taskID); return true; } @@ -7205,11 +7204,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (tii == null) { m_log.WarnFormat( - "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item does not exist", - Name, requestID, itemID, taskID); + "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item does not exist", + Name, requestID, itemID, taskID); return true; - } - + } + if (tii.Type == (int)AssetType.LSLText) { if (!((Scene)m_scene).Permissions.CanEditScript(itemID, taskID, AgentId)) @@ -7228,41 +7227,41 @@ namespace OpenSim.Region.ClientStack.LindenUDP { m_log.WarnFormat( "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but the prim is owned by {4}", - Name, requestID, itemID, taskID, part.OwnerID); + Name, requestID, itemID, taskID, part.OwnerID); return true; } - + if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) { m_log.WarnFormat( - "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but modify permissions are not set", - Name, requestID, itemID, taskID); + "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but modify permissions are not set", + Name, requestID, itemID, taskID); return true; } - + if (tii.OwnerID != AgentId) { m_log.WarnFormat( - "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but the item is owned by {4}", - Name, requestID, itemID, taskID, tii.OwnerID); + "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but the item is owned by {4}", + Name, requestID, itemID, taskID, tii.OwnerID); return true; } - + if (( - tii.CurrentPermissions & ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) + tii.CurrentPermissions & ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) { m_log.WarnFormat( - "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item permissions are not modify/copy/transfer", - Name, requestID, itemID, taskID); + "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but item permissions are not modify/copy/transfer", + Name, requestID, itemID, taskID); return true; } - + if (tii.AssetID != requestID) { m_log.WarnFormat( - "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but this does not match item's asset {4}", - Name, requestID, itemID, taskID, tii.AssetID); + "[CLIENT]: {0} requested asset {1} from item {2} in prim {3} but this does not match item's asset {4}", + Name, requestID, itemID, taskID, tii.AssetID); return true; } } @@ -7866,7 +7865,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP newTaskItem, updatetask.UpdateData.LocalID); } } - } + } return true; } @@ -8861,7 +8860,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // return true; } - + private bool HandleRequestRegionInfo(IClientAPI sender, Packet Pack) { RequestRegionInfoPacket.AgentDataBlock mPacket = ((RequestRegionInfoPacket)Pack).AgentData; @@ -8882,7 +8881,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return true; } - + private bool HandleEstateCovenantRequest(IClientAPI sender, Packet Pack) { @@ -8919,7 +8918,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP return true; } - + private bool HandleGodUpdateRegionInfoUpdate(IClientAPI client, Packet Packet) { GodUpdateRegionInfoPacket GodUpdateRegionInfo = @@ -8939,7 +8938,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleSimWideDeletes(IClientAPI client, Packet Packet) { SimWideDeletesPacket SimWideDeletesRequest = @@ -8952,7 +8951,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleGodlikeMessage(IClientAPI client, Packet Packet) { GodlikeMessagePacket GodlikeMessage = @@ -8969,7 +8968,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleSaveStatePacket(IClientAPI client, Packet Packet) { StateSavePacket SaveStateMessage = @@ -8982,7 +8981,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleGodKickUser(IClientAPI sender, Packet Pack) { GodKickUserPacket gkupack = (GodKickUserPacket)Pack; @@ -9120,7 +9119,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return true; } - + #endregion Economy/Transaction Packets #region Script Packets @@ -9333,7 +9332,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return true; } - + private bool HandleUpdateMuteListEntry(IClientAPI client, Packet Packet) { UpdateMuteListEntryPacket UpdateMuteListEntry = @@ -9349,7 +9348,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleRemoveMuteListEntry(IClientAPI client, Packet Packet) { RemoveMuteListEntryPacket RemoveMuteListEntry = @@ -9365,7 +9364,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleUserReport(IClientAPI client, Packet Packet) { UserReportPacket UserReport = @@ -9390,7 +9389,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleSendPostcard(IClientAPI client, Packet packet) { // SendPostcardPacket SendPostcard = @@ -9672,7 +9671,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP return true; } - + private bool HandleGroupVoteHistoryRequest(IClientAPI client, Packet Packet) { GroupVoteHistoryRequestPacket GroupVoteHistoryRequest = @@ -9685,7 +9684,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleGroupActiveProposalsRequest(IClientAPI client, Packet Packet) { GroupActiveProposalsRequestPacket GroupActiveProposalsRequest = @@ -9698,7 +9697,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleGroupAccountDetailsRequest(IClientAPI client, Packet Packet) { GroupAccountDetailsRequestPacket GroupAccountDetailsRequest = @@ -9711,7 +9710,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleGroupAccountSummaryRequest(IClientAPI client, Packet Packet) { GroupAccountSummaryRequestPacket GroupAccountSummaryRequest = @@ -9724,7 +9723,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleGroupTransactionsDetailsRequest(IClientAPI client, Packet Packet) { GroupAccountTransactionsRequestPacket GroupAccountTransactionsRequest = @@ -9737,7 +9736,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP } return false; } - + private bool HandleGroupTitlesRequest(IClientAPI sender, Packet Pack) { GroupTitlesRequestPacket groupTitlesRequest = @@ -11185,26 +11184,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (m_debugPacketLevel > 0) { bool outputPacket = true; - - if (m_debugPacketLevel <= 255 + + if (m_debugPacketLevel <= 255 && (packet.Type == PacketType.SimStats || packet.Type == PacketType.SimulatorViewerTimeMessage)) outputPacket = false; - - if (m_debugPacketLevel <= 200 - && - (packet.Type == PacketType.ImagePacket + + if (m_debugPacketLevel <= 200 + && (packet.Type == PacketType.ImagePacket || packet.Type == PacketType.ImageData || packet.Type == PacketType.LayerData - || packet.Type == PacketType.CoarseLocationUpdate)) + || packet.Type == PacketType.CoarseLocationUpdate)) outputPacket = false; - + if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.AvatarAnimation || packet.Type == PacketType.ViewerEffect)) - outputPacket = false; - + outputPacket = false; + if (outputPacket) m_log.DebugFormat("[CLIENT]: Packet OUT {0}", packet.Type); } - + m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting); } @@ -11279,16 +11277,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (m_debugPacketLevel > 0) { bool outputPacket = true; - + if (m_debugPacketLevel <= 255 && packet.Type == PacketType.AgentUpdate) outputPacket = false; - + if (m_debugPacketLevel <= 200 && packet.Type == PacketType.RequestImage) outputPacket = false; - + if (m_debugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation)) outputPacket = false; - + if (outputPacket) m_log.DebugFormat("[CLIENT]: Packet IN {0}", packet.Type); } @@ -11551,12 +11549,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP UUID requestID = UUID.Zero; byte source = (byte)SourceType.Asset; - - if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset) + + if (transferRequest.TransferInfo.SourceType == (int)SourceType.Asset) { requestID = new UUID(transferRequest.TransferInfo.Params, 0); } - else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimInventoryItem) + else if (transferRequest.TransferInfo.SourceType == (int)SourceType.SimInventoryItem) { requestID = new UUID(transferRequest.TransferInfo.Params, 80); source = (byte)SourceType.SimInventoryItem; @@ -11802,7 +11800,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public PacketMethod method; public bool Async; } - + public class AsyncPacketProcess { public bool result = false; @@ -11871,8 +11869,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP dialog.Data.FirstName = Util.StringToBytes256(ownerFirstName); dialog.Data.LastName = Util.StringToBytes256(ownerLastName); dialog.Data.Message = Util.StringToBytes256(message); - - + ScriptDialogPacket.ButtonsBlock[] buttons = new ScriptDialogPacket.ButtonsBlock[1]; buttons[0] = new ScriptDialogPacket.ButtonsBlock(); buttons[0].ButtonLabel = Util.StringToBytes256("!!llTextBox!!"); @@ -11886,7 +11883,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { ScenePresence presence = p as ScenePresence; // It turns out to get the agent to stop flying, you have to feed it stop flying velocities - // There's no explicit message to send the client to tell it to stop flying.. it relies on the + // There's no explicit message to send the client to tell it to stop flying.. it relies on the // velocity, collision plane and avatar height // Add 1/6 the avatar's height to it's position so it doesn't shoot into the air @@ -11903,7 +11900,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // attach a suitable collision plane regardless of the actual situation to force the LLClient to land. // Collision plane below the avatar's position a 6th of the avatar's height is suitable. - // Mind you, that this method doesn't get called if the avatar's velocity magnitude is greater then a + // Mind you, that this method doesn't get called if the avatar's velocity magnitude is greater then a // certain amount.. because the LLClient wouldn't land in that situation anyway. // why are we still testing for this really old height value default??? -- cgit v1.1 From 0db1ed0b5a6f5bd104c6008f142d173c84263ce5 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Sun, 12 Sep 2010 14:20:26 -0700 Subject: * Added ISimulationDataService and IEstateDataService * Removed StorageManager * CONFIG CHANGE: There are no more database settings in OpenSim.ini. Check the config-include configuration files for region store and estate store database settings --- .../Region/ClientStack/RegionApplicationBase.cs | 33 ++++++---------------- 1 file changed, 9 insertions(+), 24 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 46b68ec..ea1317a 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -36,6 +36,7 @@ using OpenSim.Framework.Communications; using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.Framework; +using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Physics.Manager; @@ -48,28 +49,16 @@ namespace OpenSim.Region.ClientStack protected Dictionary m_clientCircuits = new Dictionary(); protected NetworkServersInfo m_networkServersInfo; - - public NetworkServersInfo NetServersInfo - { - get { return m_networkServersInfo; } - } - protected uint m_httpServerPort; - - protected StorageManager m_storageManager; - - public StorageManager StorageManager - { - get { return m_storageManager; } - } - + protected ISimulationDataService m_simulationDataService; + protected IEstateDataService m_estateDataService; protected ClientStackManager m_clientStackManager; - - public SceneManager SceneManager - { - get { return m_sceneManager; } - } protected SceneManager m_sceneManager = new SceneManager(); + + public SceneManager SceneManager { get { return m_sceneManager; } } + public NetworkServersInfo NetServersInfo { get { return m_networkServersInfo; } } + public ISimulationDataService SimulationDataService { get { return m_simulationDataService; } } + public IEstateDataService EstateDataService { get { return m_estateDataService; } } protected abstract void Initialize(); @@ -83,15 +72,11 @@ namespace OpenSim.Region.ClientStack /// protected abstract PhysicsScene GetPhysicsScene(string osSceneIdentifier); - protected abstract StorageManager CreateStorageManager(); protected abstract ClientStackManager CreateClientStackManager(); - protected abstract Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, - AgentCircuitManager circuitManager); + protected abstract Scene CreateScene(RegionInfo regionInfo, ISimulationDataService simDataService, IEstateDataService estateDataService, AgentCircuitManager circuitManager); protected override void StartupSpecific() { - m_storageManager = CreateStorageManager(); - m_clientStackManager = CreateClientStackManager(); Initialize(); -- cgit v1.1