From de19dc3024e5359f594d0a32c593d905163c24ea Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 15 Sep 2011 18:58:58 +0100 Subject: refactor: rename SOG/SOP.GetProperties() to SendPropertiesToClient() to reflect what it actually does This also makes it consistent with some other methods that send data to the client. --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index e9ee7be..b5c6742 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -4119,8 +4119,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP while (updatesThisCall < m_maxUpdates) { lock (m_entityProps.SyncRoot) - if (!m_entityProps.TryDequeue(out iupdate, out timeinqueue)) - break; + if (!m_entityProps.TryDequeue(out iupdate, out timeinqueue)) + break; ObjectPropertyUpdate update = (ObjectPropertyUpdate)iupdate; if (update.SendFamilyProps) -- cgit v1.1 From d358125cac4e01194dae4b1f0bc9afc87e463f76 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 22 Sep 2011 00:16:05 +0100 Subject: Reinstate option to land an npc when it reaches a target. This is moved into ScenePresence for now as a general facility --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index b5c6742..ce2ff86 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -231,7 +231,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public event ScriptReset OnScriptReset; public event GetScriptRunning OnGetScriptRunning; public event SetScriptRunning OnSetScriptRunning; - public event Action OnAutoPilotGo; + public event Action OnAutoPilotGo; public event TerrainUnacked OnUnackedTerrain; public event ActivateGesture OnActivateGesture; public event DeactivateGesture OnDeactivateGesture; @@ -11640,9 +11640,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP locy = Convert.ToSingle(args[1]) - (float)regionY; locz = Convert.ToSingle(args[2]); - Action handlerAutoPilotGo = OnAutoPilotGo; + Action handlerAutoPilotGo = OnAutoPilotGo; if (handlerAutoPilotGo != null) - handlerAutoPilotGo(new Vector3(locx, locy, locz), false); + handlerAutoPilotGo(new Vector3(locx, locy, locz), false, false); } /// -- cgit v1.1 From 839c1cdcc4e9ce410636becb5b81190463dec5bf Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 24 Sep 2011 01:10:23 +0100 Subject: Improve locking when access queue in EventQueueGetModule --- .../Linden/Caps/EventQueue/EventQueueGetModule.cs | 31 ++++++++++++---------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 139d8b8..8d0c7a1 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -179,9 +179,10 @@ namespace OpenSim.Region.ClientStack.Linden { Queue queue = GetQueue(avatarID); if (queue != null) - queue.Enqueue(ev); + lock (queue) + queue.Enqueue(ev); } - catch(NullReferenceException e) + catch (NullReferenceException e) { m_log.Error("[EVENTQUEUE] Caught exception: " + e); return false; @@ -338,12 +339,8 @@ namespace OpenSim.Region.ClientStack.Linden Queue queue = GetQueue(agentID); if (queue != null) lock (queue) - { - if (queue.Count > 0) - return true; - else - return false; - } + return queue.Count > 0; + return false; } @@ -358,8 +355,6 @@ namespace OpenSim.Region.ClientStack.Linden element = queue.Dequeue(); // 15s timeout } - - int thisID = 0; lock (m_ids) thisID = m_ids[pAgentId]; @@ -431,7 +426,10 @@ namespace OpenSim.Region.ClientStack.Linden // } Queue queue = TryGetQueue(agentID); - OSD element = queue.Dequeue(); // 15s timeout + OSD element; + + lock (queue) + element = queue.Dequeue(); // 15s timeout Hashtable responsedata = new Hashtable(); @@ -470,10 +468,14 @@ namespace OpenSim.Region.ClientStack.Linden else { array.Add(element); - while (queue.Count > 0) + + lock (queue) { - array.Add(queue.Dequeue()); - thisID++; + while (queue.Count > 0) + { + array.Add(queue.Dequeue()); + thisID++; + } } } @@ -520,6 +522,7 @@ namespace OpenSim.Region.ClientStack.Linden AvatarID = m_QueueUUIDAvatarMapping[capUUID]; } } + if (AvatarID != UUID.Zero) { return ProcessQueue(request, AvatarID, m_scene.CapsModule.GetCapsForUser(AvatarID)); -- cgit v1.1 From e77c919290e166f19e77f3ef040418dd39f2f5bd Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Mon, 3 Oct 2011 11:55:54 -0700 Subject: Remove usage of Linden packet types from inside Attachments Module and interface --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index ce2ff86..29dce17 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -6079,9 +6079,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP RezMultipleAttachmentsFromInv handlerRezMultipleAttachments = OnRezMultipleAttachmentsFromInv; if (handlerRezMultipleAttachments != null) { - RezMultipleAttachmentsFromInvPacket rez = (RezMultipleAttachmentsFromInvPacket)Pack; - handlerRezMultipleAttachments(this, rez.HeaderData, - rez.ObjectData); + List> rezlist = new List>(); + foreach (RezMultipleAttachmentsFromInvPacket.ObjectDataBlock obj in ((RezMultipleAttachmentsFromInvPacket)Pack).ObjectData) + rezlist.Add(new KeyValuePair(obj.ItemID, obj.AttachmentPt)); + handlerRezMultipleAttachments(this, rezlist); } return true; -- cgit v1.1 From 37ae6451f9ddb2e07402a5e79a9ab58668781104 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 3 Oct 2011 23:25:09 +0100 Subject: Remove vestigal RegionStatus.SlaveScene. This appears to be code clutter since the code that uses this has long gone. --- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index f2388cd..304efe6 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -929,25 +929,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP UUID sessionID = useCircuitCode.CircuitCode.SessionID; uint circuitCode = useCircuitCode.CircuitCode.Code; - if (m_scene.RegionStatus != RegionStatus.SlaveScene) + AuthenticateResponse sessionInfo; + if (IsClientAuthorized(useCircuitCode, out sessionInfo)) { - AuthenticateResponse sessionInfo; - if (IsClientAuthorized(useCircuitCode, out sessionInfo)) - { - AddClient(circuitCode, agentID, sessionID, remoteEndPoint, sessionInfo); - } - else - { - // Don't create circuits for unauthorized clients - m_log.WarnFormat( - "[LLUDPSERVER]: Connection request for client {0} connecting with unnotified circuit code {1} from {2}", - useCircuitCode.CircuitCode.ID, useCircuitCode.CircuitCode.Code, remoteEndPoint); - } + AddClient(circuitCode, agentID, sessionID, remoteEndPoint, sessionInfo); } else { - // Slave regions don't accept new clients - m_log.Debug("[LLUDPSERVER]: Slave region " + m_scene.RegionInfo.RegionName + " ignoring UseCircuitCode packet"); + // Don't create circuits for unauthorized clients + m_log.WarnFormat( + "[LLUDPSERVER]: Connection request for client {0} connecting with unnotified circuit code {1} from {2}", + useCircuitCode.CircuitCode.ID, useCircuitCode.CircuitCode.Code, remoteEndPoint); } } -- cgit v1.1