From a7281003d85b6e9620d02387d4d9a42dcae27b24 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 30 Aug 2012 01:30:56 +0100 Subject: move keyframemotion.copy from sop.copy to sog.copy, where there is newgroup information avaiable. --- OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | 4 ++-- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 4 ++++ OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index e4e6f2c..233e559 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs @@ -272,8 +272,6 @@ namespace OpenSim.Region.Framework.Scenes newmotion.m_basePosition = m_basePosition; newmotion.m_baseRotation = m_baseRotation; - newmotion.m_currentFrame = m_currentFrame; - if (m_selected) newmotion.m_serializedPosition = m_serializedPosition; else @@ -284,6 +282,8 @@ namespace OpenSim.Region.Framework.Scenes newmotion.m_serializedPosition = m_serializedPosition; } + newmotion.m_currentFrame = m_currentFrame; + newmotion.m_iterations = m_iterations; newmotion.m_running = m_running; diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index df4bd0d..bc0f5b6 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2159,6 +2159,7 @@ namespace OpenSim.Region.Framework.Scenes dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; + if (userExposed) dupe.m_rootPart.TrimPermissions(); @@ -2209,6 +2210,9 @@ namespace OpenSim.Region.Framework.Scenes if (userExposed) newPart.ApplyPhysics((uint)newPart.Flags,newPart.VolumeDetectActive,true); // } + // copy keyframemotion + if (part.KeyframeMotion != null) + newPart.KeyframeMotion = part.KeyframeMotion.Copy(dupe); } if (userExposed) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 4788a24..56d289f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -2110,8 +2110,8 @@ namespace OpenSim.Region.Framework.Scenes Array.Copy(Shape.ExtraParams, extraP, extraP.Length); dupe.Shape.ExtraParams = extraP; - if (KeyframeMotion != null) - dupe.KeyframeMotion = KeyframeMotion.Copy(null); + // safeguard actual copy is done in sog.copy + dupe.KeyframeMotion = null; if (userExposed) { -- cgit v1.1 From 63e6666f2216a34da8327bcd94f94c4ed6c2b254 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 1 Sep 2012 02:05:28 +0100 Subject: try to reduce potencial recursive locking --- .../CoreModules/World/Land/LandManagementModule.cs | 77 ++++++++++++++-------- 1 file changed, 51 insertions(+), 26 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 51dcb67..8bc81ae 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -86,7 +86,10 @@ namespace OpenSim.Region.CoreModules.World.Land /// /// Land objects keyed by local id /// - private readonly Dictionary m_landList = new Dictionary(); +// private readonly Dictionary m_landList = new Dictionary(); + + //ubit: removed the readonly so i can move it around + private Dictionary m_landList = new Dictionary(); private int m_lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1; @@ -242,15 +245,19 @@ namespace OpenSim.Region.CoreModules.World.Land { LandData newData = data.Copy(); newData.LocalID = local_id; + ILandObject landobj = null; lock (m_landList) { if (m_landList.ContainsKey(local_id)) { m_landList[local_id].LandData = newData; - m_scene.EventManager.TriggerLandObjectUpdated((uint)local_id, m_landList[local_id]); + landobj = m_landList[local_id]; +// m_scene.EventManager.TriggerLandObjectUpdated((uint)local_id, m_landList[local_id]); } } + if(landobj != null) + m_scene.EventManager.TriggerLandObjectUpdated((uint)local_id, landobj); } public bool AllowedForcefulBans @@ -280,14 +287,14 @@ namespace OpenSim.Region.CoreModules.World.Land protected ILandObject CreateDefaultParcel() { m_log.DebugFormat( - "[LAND MANAGEMENT MODULE]: Creating default parcel for region {0}", m_scene.RegionInfo.RegionName); - - ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene); + "[LAND MANAGEMENT MODULE]: Creating default parcel for region {0}", m_scene.RegionInfo.RegionName); + + ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene); fullSimParcel.SetLandBitmap(fullSimParcel.GetSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); fullSimParcel.LandData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; fullSimParcel.LandData.ClaimDate = Util.UnixTimeSinceEpoch(); - - return AddLandObject(fullSimParcel); + + return AddLandObject(fullSimParcel); } public List AllParcels() @@ -617,21 +624,28 @@ namespace OpenSim.Region.CoreModules.World.Land /// public void Clear(bool setupDefaultParcel) { + Dictionary landworkList; + // move to work pointer since we are deleting it all lock (m_landList) { - foreach (ILandObject lo in m_landList.Values) - { - //m_scene.SimulationDataService.RemoveLandObject(lo.LandData.GlobalID); - m_scene.EventManager.TriggerLandObjectRemoved(lo.LandData.GlobalID); - } + landworkList = m_landList; + m_landList = new Dictionary(); + } - m_landList.Clear(); + // this 2 methods have locks (now) + ResetSimLandObjects(); - ResetSimLandObjects(); + if (setupDefaultParcel) + CreateDefaultParcel(); - if (setupDefaultParcel) - CreateDefaultParcel(); + // fire outside events unlocked + foreach (ILandObject lo in landworkList.Values) + { + //m_scene.SimulationDataService.RemoveLandObject(lo.LandData.GlobalID); + m_scene.EventManager.TriggerLandObjectRemoved(lo.LandData.GlobalID); } + landworkList.Clear(); + } private void performFinalLandJoin(ILandObject master, ILandObject slave) @@ -1324,20 +1338,30 @@ namespace OpenSim.Region.CoreModules.World.Land public void EventManagerOnIncomingLandDataFromStorage(List data) { + Dictionary landworkList; + // move to work pointer since we are deleting it all + lock (m_landList) + { + landworkList = m_landList; + m_landList = new Dictionary(); + } + + //Remove all the land objects in the sim and then process our new data + foreach (int n in landworkList.Keys) + { + m_scene.EventManager.TriggerLandObjectRemoved(landworkList[n].LandData.GlobalID); + } + landworkList.Clear(); + lock (m_landList) { - //Remove all the land objects in the sim and then process our new data - foreach (int n in m_landList.Keys) - { - m_scene.EventManager.TriggerLandObjectRemoved(m_landList[n].LandData.GlobalID); - } m_landIDList.Initialize(); m_landList.Clear(); + } - for (int i = 0; i < data.Count; i++) - { - IncomingLandObjectFromStorage(data[i]); - } + for (int i = 0; i < data.Count; i++) + { + IncomingLandObjectFromStorage(data[i]); } } @@ -1366,7 +1390,8 @@ namespace OpenSim.Region.CoreModules.World.Land public void EventManagerOnNoLandDataFromStorage() { - lock (m_landList) + // called methods already have locks +// lock (m_landList) { ResetSimLandObjects(); CreateDefaultParcel(); -- cgit v1.1 From 7cfcca87c6f9a9b280ab5e13ba92fff1830ee203 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 3 Sep 2012 13:25:31 +0200 Subject: Prevent a nullref if SimStatsReporter tries to report on a sim where psysics are not yet initialized --- .../Region/Framework/Scenes/SimStatsReporter.cs | 31 ++++++++++++---------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs index 20919a1..756b1f4 100644 --- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs @@ -438,23 +438,26 @@ namespace OpenSim.Region.Framework.Scenes } // Extra statistics that aren't currently sent to clients - lock (m_lastReportedExtraSimStats) + if (m_scene.PhysicsScene != null) { - m_lastReportedExtraSimStats[LastReportedObjectUpdateStatName] = m_objectUpdates / m_statsUpdateFactor; - - Dictionary physicsStats = m_scene.PhysicsScene.GetStats(); - - if (physicsStats != null) + lock (m_lastReportedExtraSimStats) { - foreach (KeyValuePair tuple in physicsStats) + m_lastReportedExtraSimStats[LastReportedObjectUpdateStatName] = m_objectUpdates / m_statsUpdateFactor; + + Dictionary physicsStats = m_scene.PhysicsScene.GetStats(); + + if (physicsStats != null) { - // FIXME: An extremely dirty hack to divide MS stats per frame rather than per second - // Need to change things so that stats source can indicate whether they are per second or - // per frame. - if (tuple.Key.EndsWith("MS")) - m_lastReportedExtraSimStats[tuple.Key] = tuple.Value * perframe; - else - m_lastReportedExtraSimStats[tuple.Key] = tuple.Value / m_statsUpdateFactor; + foreach (KeyValuePair tuple in physicsStats) + { + // FIXME: An extremely dirty hack to divide MS stats per frame rather than per second + // Need to change things so that stats source can indicate whether they are per second or + // per frame. + if (tuple.Key.EndsWith("MS")) + m_lastReportedExtraSimStats[tuple.Key] = tuple.Value * perframe; + else + m_lastReportedExtraSimStats[tuple.Key] = tuple.Value / m_statsUpdateFactor; + } } } } -- cgit v1.1 From 056e66b3dec555613bd96b153ba03a124863dbf2 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 4 Sep 2012 03:14:39 +0200 Subject: Refactor avatar transfer so that the heavy (UpdateAgent) part is separated into it's own sub-method --- .../EntityTransfer/EntityTransferModule.cs | 204 +++++++++++---------- .../Framework/Interfaces/IEntityTransferModule.cs | 4 +- .../Region/Framework/Scenes/SceneObjectGroup.cs | 2 +- 3 files changed, 113 insertions(+), 97 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 9ffb851..1f884c8 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -220,7 +220,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer /// /// /// - /// private void TeleportAgentWithinRegion(ScenePresence sp, Vector3 position, Vector3 lookAt, uint teleportFlags) { m_log.DebugFormat( @@ -982,7 +982,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer agent.IsInTransit = true; CrossAgentToNewRegionDelegate d = CrossAgentToNewRegionAsync; - d.BeginInvoke(agent, newpos, x, y, neighbourRegion, isFlying, version, CrossAgentToNewRegionCompleted, d); + d.BeginInvoke(agent, newpos, neighbourRegion, isFlying, version, CrossAgentToNewRegionCompleted, d); return true; } @@ -1039,42 +1039,43 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer icon.EndInvoke(iar); } + public bool CrossAgentToNewRegionPrep(ScenePresence agent, GridRegion neighbourRegion) + { + if (neighbourRegion == null) + return false; + + m_entityTransferStateMachine.SetInTransit(agent.UUID); + + agent.RemoveFromPhysicalScene(); + + return true; + } + /// /// This Closes child agents on neighbouring regions /// Calls an asynchronous method to do so.. so it doesn't lag the sim. /// public ScenePresence CrossAgentToNewRegionAsync( - ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, GridRegion neighbourRegion, + ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, string version) { - if (neighbourRegion == null) + if (!CrossAgentToNewRegionPrep(agent, neighbourRegion)) return agent; - try - { - m_entityTransferStateMachine.SetInTransit(agent.UUID); - - ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); - - m_log.DebugFormat( - "[ENTITY TRANSFER MODULE]: Crossing agent {0} {1} to {2}-{3} running version {4}", - agent.Firstname, agent.Lastname, neighbourx, neighboury, version); - - Scene m_scene = agent.Scene; - - if (!agent.ValidateAttachments()) - m_log.DebugFormat( - "[ENTITY TRANSFER MODULE]: Failed validation of all attachments for region crossing of {0} from {1} to {2}. Continuing.", - agent.Name, agent.Scene.RegionInfo.RegionName, neighbourRegion.RegionName); - - pos = pos + agent.Velocity; - Vector3 vel2 = new Vector3(agent.Velocity.X, agent.Velocity.Y, 0); + if (!CrossAgentIntoNewRegionMain(agent, pos, neighbourRegion, isFlying)) + return agent; - agent.RemoveFromPhysicalScene(); + CrossAgentToNewRegionPost(agent, pos, neighbourRegion, isFlying, version); + return agent; + } + public bool CrossAgentIntoNewRegionMain(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying) + { + try + { AgentData cAgent = new AgentData(); agent.CopyTo(cAgent); - cAgent.Position = pos; + cAgent.Position = pos + agent.Velocity; if (isFlying) cAgent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; @@ -1084,7 +1085,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // Beyond this point, extra cleanup is needed beyond removing transit state m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.Transferring); - if (!m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent)) + if (!agent.Scene.SimulationService.UpdateAgent(neighbourRegion, cAgent)) { // region doesn't take it m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp); @@ -1093,93 +1094,108 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer agent.AddToPhysicalScene(isFlying); m_entityTransferStateMachine.ResetFromTransit(agent.UUID); - return agent; + return false; } - //AgentCircuitData circuitdata = m_controllingClient.RequestClientInfo(); - agent.ControllingClient.RequestClientInfo(); + } + catch (Exception e) + { + m_log.ErrorFormat( + "[ENTITY TRANSFER MODULE]: Problem crossing user {0} to new region {1} from {2}. Exception {3}{4}", + agent.Name, neighbourRegion.RegionName, agent.Scene.RegionInfo.RegionName, e.Message, e.StackTrace); - //m_log.Debug("BEFORE CROSS"); - //Scene.DumpChildrenSeeds(UUID); - //DumpKnownRegions(); - string agentcaps; - if (!agent.KnownRegions.TryGetValue(neighbourRegion.RegionHandle, out agentcaps)) - { - m_log.ErrorFormat("[ENTITY TRANSFER MODULE]: No ENTITY TRANSFER MODULE information for region handle {0}, exiting CrossToNewRegion.", - neighbourRegion.RegionHandle); - return agent; - } - // No turning back - agent.IsChildAgent = true; + // TODO: Might be worth attempting other restoration here such as reinstantiation of scripts, etc. + return false; + } - string capsPath = neighbourRegion.ServerURI + CapsUtil.GetCapsSeedPath(agentcaps); + return true; + } - m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, agent.UUID); + public void CrossAgentToNewRegionPost(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, + bool isFlying, string version) + { + agent.ControllingClient.RequestClientInfo(); - if (m_eqModule != null) - { - m_eqModule.CrossRegion( - neighbourHandle, pos, vel2 /* agent.Velocity */, neighbourRegion.ExternalEndPoint, - capsPath, agent.UUID, agent.ControllingClient.SessionId); - } - else - { - agent.ControllingClient.CrossRegion(neighbourHandle, pos, agent.Velocity, neighbourRegion.ExternalEndPoint, - capsPath); - } + string agentcaps; + if (!agent.KnownRegions.TryGetValue(neighbourRegion.RegionHandle, out agentcaps)) + { + m_log.ErrorFormat("[ENTITY TRANSFER MODULE]: No ENTITY TRANSFER MODULE information for region handle {0}, exiting CrossToNewRegion.", + neighbourRegion.RegionHandle); + return; + } - // SUCCESS! - m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.ReceivedAtDestination); + // No turning back + agent.IsChildAgent = true; - // Unlike a teleport, here we do not wait for the destination region to confirm the receipt. - m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp); + string capsPath = neighbourRegion.ServerURI + CapsUtil.GetCapsSeedPath(agentcaps); - agent.MakeChildAgent(); + m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Sending new CAPS seed url {0} to client {1}", capsPath, agent.UUID); - // FIXME: Possibly this should occur lower down after other commands to close other agents, - // but not sure yet what the side effects would be. - m_entityTransferStateMachine.ResetFromTransit(agent.UUID); + Vector3 vel2 = new Vector3(agent.Velocity.X, agent.Velocity.Y, 0); - // now we have a child agent in this region. Request all interesting data about other (root) agents - agent.SendOtherAgentsAvatarDataToMe(); - agent.SendOtherAgentsAppearanceToMe(); + if (m_eqModule != null) + { + m_eqModule.CrossRegion( + neighbourRegion.RegionHandle, pos + agent.Velocity, vel2 /* agent.Velocity */, neighbourRegion.ExternalEndPoint, + capsPath, agent.UUID, agent.ControllingClient.SessionId); + } + else + { + agent.ControllingClient.CrossRegion(neighbourRegion.RegionHandle, pos + agent.Velocity, agent.Velocity, neighbourRegion.ExternalEndPoint, + capsPath); + } - // Backwards compatibility. Best effort - if (version == "Unknown" || version == string.Empty) - { - m_log.DebugFormat("[ENTITY TRANSFER MODULE]: neighbor with old version, passing attachments one by one..."); - Thread.Sleep(3000); // wait a little now that we're not waiting for the callback - CrossAttachmentsIntoNewRegion(neighbourRegion, agent, true); - } + // SUCCESS! + m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.ReceivedAtDestination); - // Next, let's close the child agent connections that are too far away. - agent.CloseChildAgents(neighbourx, neighboury); + // Unlike a teleport, here we do not wait for the destination region to confirm the receipt. + m_entityTransferStateMachine.UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp); - AgentHasMovedAway(agent, false); + agent.MakeChildAgent(); - // the user may change their profile information in other region, - // so the userinfo in UserProfileCache is not reliable any more, delete it - // REFACTORING PROBLEM. Well, not a problem, but this method is HORRIBLE! - if (agent.Scene.NeedSceneCacheClear(agent.UUID)) - { - m_log.DebugFormat( - "[ENTITY TRANSFER MODULE]: User {0} is going to another region", agent.UUID); - } - - //m_log.Debug("AFTER CROSS"); - //Scene.DumpChildrenSeeds(UUID); - //DumpKnownRegions(); - } - catch (Exception e) + // FIXME: Possibly this should occur lower down after other commands to close other agents, + // but not sure yet what the side effects would be. + m_entityTransferStateMachine.ResetFromTransit(agent.UUID); + + // now we have a child agent in this region. Request all interesting data about other (root) agents + agent.SendOtherAgentsAvatarDataToMe(); + agent.SendOtherAgentsAppearanceToMe(); + + // Backwards compatibility. Best effort + if (version == "Unknown" || version == string.Empty) { - m_log.ErrorFormat( - "[ENTITY TRANSFER MODULE]: Problem crossing user {0} to new region {1} from {2}. Exception {3}{4}", - agent.Name, neighbourRegion.RegionName, agent.Scene.RegionInfo.RegionName, e.Message, e.StackTrace); + m_log.DebugFormat("[ENTITY TRANSFER MODULE]: neighbor with old version, passing attachments one by one..."); + Thread.Sleep(3000); // wait a little now that we're not waiting for the callback + CrossAttachmentsIntoNewRegion(neighbourRegion, agent, true); + } - // TODO: Might be worth attempting other restoration here such as reinstantiation of scripts, etc. + // Next, let's close the child agent connections that are too far away. + uint neighbourx; + uint neighboury; + + Utils.LongToUInts(neighbourRegion.RegionHandle, out neighbourx, out neighboury); + + neighbourx /= Constants.RegionSize; + neighboury /= Constants.RegionSize; + + agent.CloseChildAgents(neighbourx, neighboury); + + AgentHasMovedAway(agent, false); + + // the user may change their profile information in other region, + // so the userinfo in UserProfileCache is not reliable any more, delete it + // REFACTORING PROBLEM. Well, not a problem, but this method is HORRIBLE! + if (agent.Scene.NeedSceneCacheClear(agent.UUID)) + { + m_log.DebugFormat( + "[ENTITY TRANSFER MODULE]: User {0} is going to another region", agent.UUID); } - return agent; + //m_log.Debug("AFTER CROSS"); + //Scene.DumpChildrenSeeds(UUID); + //DumpKnownRegions(); + + return; } private void CrossAgentToNewRegionCompleted(IAsyncResult iar) diff --git a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs index 5bc8e51..1949a90 100644 --- a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs @@ -35,7 +35,7 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.Framework.Interfaces { - public delegate ScenePresence CrossAgentToNewRegionDelegate(ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, GridRegion neighbourRegion, bool isFlying, string version); + public delegate ScenePresence CrossAgentToNewRegionDelegate(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, string version); public interface IEntityTransferModule { @@ -76,7 +76,7 @@ namespace OpenSim.Region.Framework.Interfaces void Cross(SceneObjectGroup sog, Vector3 position, bool silent); - ScenePresence CrossAgentToNewRegionAsync(ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, GridRegion neighbourRegion, bool isFlying, string version); + ScenePresence CrossAgentToNewRegionAsync(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, string version); } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index bc0f5b6..4798481 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -581,7 +581,7 @@ namespace OpenSim.Region.Framework.Scenes av.IsInTransit = true; CrossAgentToNewRegionDelegate d = entityTransfer.CrossAgentToNewRegionAsync; - d.BeginInvoke(av, val, x, y, destination, av.Flying, version, CrossAgentToNewRegionCompleted, d); + d.BeginInvoke(av, val, destination, av.Flying, version, CrossAgentToNewRegionCompleted, d); } else m_log.DebugFormat("[SCENE OBJECT]: Crossing avatar alreasy in transit {0} to {1}", av.Name, val); -- cgit v1.1 From 3fb2523f5b324862f4a125c5bdaeff9e512a67c0 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 4 Sep 2012 03:20:37 +0200 Subject: Remove debug spam --- OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index e0e358a..13762f7 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs @@ -188,9 +188,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp args.Type = PollServiceEventArgs.EventType.LslHttp; m_HttpServer.AddPollServiceHTTPHandler(uri, args); - m_log.DebugFormat( - "[URL MODULE]: Set up incoming request url {0} for {1} in {2} {3}", - uri, itemID, host.Name, host.LocalId); +// m_log.DebugFormat( +// "[URL MODULE]: Set up incoming request url {0} for {1} in {2} {3}", +// uri, itemID, host.Name, host.LocalId); engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url }); } @@ -234,9 +234,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp args.Type = PollServiceEventArgs.EventType.LslHttp; m_HttpsServer.AddPollServiceHTTPHandler(uri, args); - m_log.DebugFormat( - "[URL MODULE]: Set up incoming secure request url {0} for {1} in {2} {3}", - uri, itemID, host.Name, host.LocalId); +// m_log.DebugFormat( +// "[URL MODULE]: Set up incoming secure request url {0} for {1} in {2} {3}", +// uri, itemID, host.Name, host.LocalId); engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url }); } -- cgit v1.1 From e1755e2d71e0573e02c042bc1e9fe409842cc214 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 4 Sep 2012 04:56:37 +0100 Subject: let avatar keep flying in tps to same region. (still bad for other regions ) --- .../CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 9ffb851..86d7f83 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -264,6 +264,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer position.Z = newPosZ; } + if (sp.Flying) + teleportFlags |= (uint)TeleportFlags.IsFlying; + m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring); sp.ControllingClient.SendTeleportStart(teleportFlags); @@ -471,6 +474,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer if (sp.ParentID != (uint)0) sp.StandUp(); + else if (sp.Flying) + teleportFlags |= (uint)TeleportFlags.IsFlying; + sp.ControllingClient.SendTeleportStart(teleportFlags); // the avatar.Close below will clear the child region list. We need this below for (possibly) -- cgit v1.1 From d4fad2ba42445f72b8a04378b21818ec82ab1089 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 4 Sep 2012 07:32:03 +0100 Subject: a forgotten file plus minor changes. Imp and SL viewer seem to preserve flight. FS 4.2.2 does not. --- .../Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs | 7 ++++++- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 4 +++- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs index b9222e3..fb41d23 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs @@ -151,6 +151,10 @@ namespace OpenSim.Region.ClientStack.Linden ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL, UUID agentID) { + ulong tpflags = 1L << 4; // AgentManager.TeleportFlags.ViaLocation + if((flags & (uint)TeleportFlags.IsFlying) != 0) + tpflags |= 1 << 13; // IsFLying; + OSDMap info = new OSDMap(); info.Add("AgentID", OSD.FromUUID(agentID)); info.Add("LocationID", OSD.FromInteger(4)); // TODO what is this? @@ -159,7 +163,8 @@ namespace OpenSim.Region.ClientStack.Linden info.Add("SimAccess", OSD.FromInteger(simAccess)); info.Add("SimIP", OSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes())); info.Add("SimPort", OSD.FromInteger(regionExternalEndPoint.Port)); - info.Add("TeleportFlags", OSD.FromULong(1L << 4)); // AgentManager.TeleportFlags.ViaLocation +// info.Add("TeleportFlags", OSD.FromULong(1L << 4)); // AgentManager.TeleportFlags.ViaLocation + info.Add("TeleportFlags", OSD.FromULong(tpflags)); OSDArray infoArr = new OSDArray(); infoArr.Add(info); diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index ddd8f18..e78ebed 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -808,7 +808,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP handshake.RegionInfo3.ProductName = Util.StringToBytes256(regionInfo.RegionType); handshake.RegionInfo3.ProductSKU = Utils.EmptyBytes; - OutPacket(handshake, ThrottleOutPacketType.Task); +// OutPacket(handshake, ThrottleOutPacketType.Task); + // use same as MoveAgentIntoRegion (both should be task ) + OutPacket(handshake, ThrottleOutPacketType.Unknown); } public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 47b2ead..34ac7d4 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1264,7 +1264,8 @@ namespace OpenSim.Region.Framework.Scenes Vector3 look = Velocity; - if ((look.X == 0) && (look.Y == 0) && (look.Z == 0)) + // if ((look.X == 0) && (look.Y == 0) && (look.Z == 0)) + if ((Math.Abs(look.X) < 0.1) && (Math.Abs(look.Y) < 0.1) && (Math.Abs(look.Z) < 0.1)) { look = new Vector3(0.99f, 0.042f, 0); } -- cgit v1.1 From c298ae9e75f00f2009c87de30b295af20dcb86a2 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 4 Sep 2012 10:51:43 +0100 Subject: bug fix --- .../ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs index fb41d23..7dcf137 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs @@ -151,9 +151,11 @@ namespace OpenSim.Region.ClientStack.Linden ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL, UUID agentID) { - ulong tpflags = 1L << 4; // AgentManager.TeleportFlags.ViaLocation - if((flags & (uint)TeleportFlags.IsFlying) != 0) - tpflags |= 1 << 13; // IsFLying; + // not sure why flags get overwritten here + if ((flags & (uint)TeleportFlags.IsFlying) != 0) + flags = (uint)TeleportFlags.ViaLocation | (uint)TeleportFlags.IsFlying; + else + flags = (uint)TeleportFlags.ViaLocation; OSDMap info = new OSDMap(); info.Add("AgentID", OSD.FromUUID(agentID)); @@ -164,7 +166,7 @@ namespace OpenSim.Region.ClientStack.Linden info.Add("SimIP", OSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes())); info.Add("SimPort", OSD.FromInteger(regionExternalEndPoint.Port)); // info.Add("TeleportFlags", OSD.FromULong(1L << 4)); // AgentManager.TeleportFlags.ViaLocation - info.Add("TeleportFlags", OSD.FromULong(tpflags)); + info.Add("TeleportFlags", OSD.FromUInteger(flags)); OSDArray infoArr = new OSDArray(); infoArr.Add(info); -- cgit v1.1 From 9ae293881addf98844b8f292298bc0674ebbed0d Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 4 Sep 2012 22:53:52 +0200 Subject: Make friend notifies and closing child agents async because both can block the heartbeat thread if the sim being contacted is unresponsive --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 +- .../Connectors/Friends/FriendsSimConnector.cs | 68 ++++++++++++---------- .../Simulation/SimulationServiceConnector.cs | 21 +++---- 3 files changed, 48 insertions(+), 43 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 34ac7d4..433efc7 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3432,7 +3432,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void PhysicsCollisionUpdate(EventArgs e) { - if (IsChildAgent) + if (IsChildAgent || Animator == null) return; //if ((Math.Abs(Velocity.X) > 0.1e-9f) || (Math.Abs(Velocity.Y) > 0.1e-9f)) diff --git a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs index 3fd0c53..6cd21d1 100644 --- a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs +++ b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs @@ -144,44 +144,48 @@ namespace OpenSim.Services.Connectors.Friends private bool Call(GridRegion region, Dictionary sendData) { - string reqString = ServerUtils.BuildQueryString(sendData); - //m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: queryString = {0}", reqString); - if (region == null) - return false; - - string path = ServicePath(); - if (!region.ServerURI.EndsWith("/")) - path = "/" + path; - string uri = region.ServerURI + path; - m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: calling {0}", uri); - - try - { - string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); - if (reply != string.Empty) + Util.FireAndForget(x => { + string reqString = ServerUtils.BuildQueryString(sendData); + //m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: queryString = {0}", reqString); + if (region == null) + return; + + string path = ServicePath(); + if (!region.ServerURI.EndsWith("/")) + path = "/" + path; + string uri = region.ServerURI + path; + m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: calling {0}", uri); + + try { - Dictionary replyData = ServerUtils.ParseXmlResponse(reply); - - if (replyData.ContainsKey("RESULT")) + string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString); + if (reply != string.Empty) { - if (replyData["RESULT"].ToString().ToLower() == "true") - return true; + Dictionary replyData = ServerUtils.ParseXmlResponse(reply); + + if (replyData.ContainsKey("RESULT")) + { +// if (replyData["RESULT"].ToString().ToLower() == "true") +// return; +// else + return; + } else - return false; + m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: reply data does not contain result field"); + } else - m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: reply data does not contain result field"); - + m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: received empty reply"); + } + catch (Exception e) + { + m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: Exception when contacting remote sim at {0}: {1}", uri, e.Message); } - else - m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: received empty reply"); - } - catch (Exception e) - { - m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: Exception when contacting remote sim at {0}: {1}", uri, e.Message); - } - - return false; + + return; + }); + + return true; } } } diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index e1c2243..508baf7 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs @@ -395,17 +395,18 @@ namespace OpenSim.Services.Connectors.Simulation private bool CloseAgent(GridRegion destination, UUID id, bool ChildOnly) { // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: CloseAgent start"); + Util.FireAndForget(x => { + string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; - string uri = destination.ServerURI + AgentPath() + id + "/" + destination.RegionID.ToString() + "/"; - - try - { - WebUtil.ServiceOSDRequest(uri, null, "DELETE", 10000, false); - } - catch (Exception e) - { - m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CloseAgent failed with exception; {0}",e.ToString()); - } + try + { + WebUtil.ServiceOSDRequest(uri, null, "DELETE", 10000, false); + } + catch (Exception e) + { + m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] CloseAgent failed with exception; {0}",e.ToString()); + } + }); return true; } -- cgit v1.1 From 041fcd6a72e1822656d58f87a398e3a0f065a486 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 6 Sep 2012 17:18:34 +0100 Subject: remove extra '/' in assets url --- .../Connectors/Asset/AssetServicesConnector.cs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index 45ebf3a..7ad6f0b 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs @@ -181,7 +181,8 @@ namespace OpenSim.Services.Connectors public AssetBase Get(string id) { - string uri = MapServer(id) + "/assets/" + id; +// string uri = MapServer(id) + "/assets/" + id; + string uri = MapServer(id) + "assets/" + id; AssetBase asset = null; if (m_Cache != null) @@ -218,7 +219,8 @@ namespace OpenSim.Services.Connectors return fullAsset.Metadata; } - string uri = MapServer(id) + "/assets/" + id + "/metadata"; +// string uri = MapServer(id) + "/assets/" + id + "/metadata"; + string uri = MapServer(id) + "assets/" + id + "/metadata"; AssetMetadata asset = SynchronousRestObjectRequester. MakeRequest("GET", uri, 0); @@ -260,7 +262,8 @@ namespace OpenSim.Services.Connectors public bool Get(string id, Object sender, AssetRetrieved handler) { - string uri = MapServer(id) + "/assets/" + id; +// string uri = MapServer(id) + "/assets/" + id; + string uri = MapServer(id) + "assets/" + id; AssetBase asset = null; if (m_Cache != null) @@ -379,7 +382,9 @@ namespace OpenSim.Services.Connectors return asset.ID; } - string uri = MapServer(asset.FullID.ToString()) + "/assets/"; +// string uri = MapServer(asset.FullID.ToString()) + "/assets/"; + + string uri = MapServer(asset.FullID.ToString()) + "assets/"; string newID = string.Empty; try @@ -456,7 +461,8 @@ namespace OpenSim.Services.Connectors } asset.Data = data; - string uri = MapServer(id) + "/assets/" + id; +// string uri = MapServer(id) + "/assets/" + id; + string uri = MapServer(id) + "assets/" + id; if (SynchronousRestObjectRequester. MakeRequest("POST", uri, asset)) @@ -471,7 +477,8 @@ namespace OpenSim.Services.Connectors public bool Delete(string id) { - string uri = MapServer(id) + "/assets/" + id; +// string uri = MapServer(id) + "/assets/" + id; + string uri = MapServer(id) + "assets/" + id; if (SynchronousRestObjectRequester. MakeRequest("DELETE", uri, 0)) -- cgit v1.1 From 27d345c9a0047af44296184557aed25719b2759e Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 6 Sep 2012 17:02:55 +0200 Subject: Revert " remove extra '/' in assets url" This reverts commit 041fcd6a72e1822656d58f87a398e3a0f065a486. --- .../Connectors/Asset/AssetServicesConnector.cs | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index 7ad6f0b..45ebf3a 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs @@ -181,8 +181,7 @@ namespace OpenSim.Services.Connectors public AssetBase Get(string id) { -// string uri = MapServer(id) + "/assets/" + id; - string uri = MapServer(id) + "assets/" + id; + string uri = MapServer(id) + "/assets/" + id; AssetBase asset = null; if (m_Cache != null) @@ -219,8 +218,7 @@ namespace OpenSim.Services.Connectors return fullAsset.Metadata; } -// string uri = MapServer(id) + "/assets/" + id + "/metadata"; - string uri = MapServer(id) + "assets/" + id + "/metadata"; + string uri = MapServer(id) + "/assets/" + id + "/metadata"; AssetMetadata asset = SynchronousRestObjectRequester. MakeRequest("GET", uri, 0); @@ -262,8 +260,7 @@ namespace OpenSim.Services.Connectors public bool Get(string id, Object sender, AssetRetrieved handler) { -// string uri = MapServer(id) + "/assets/" + id; - string uri = MapServer(id) + "assets/" + id; + string uri = MapServer(id) + "/assets/" + id; AssetBase asset = null; if (m_Cache != null) @@ -382,9 +379,7 @@ namespace OpenSim.Services.Connectors return asset.ID; } -// string uri = MapServer(asset.FullID.ToString()) + "/assets/"; - - string uri = MapServer(asset.FullID.ToString()) + "assets/"; + string uri = MapServer(asset.FullID.ToString()) + "/assets/"; string newID = string.Empty; try @@ -461,8 +456,7 @@ namespace OpenSim.Services.Connectors } asset.Data = data; -// string uri = MapServer(id) + "/assets/" + id; - string uri = MapServer(id) + "assets/" + id; + string uri = MapServer(id) + "/assets/" + id; if (SynchronousRestObjectRequester. MakeRequest("POST", uri, asset)) @@ -477,8 +471,7 @@ namespace OpenSim.Services.Connectors public bool Delete(string id) { -// string uri = MapServer(id) + "/assets/" + id; - string uri = MapServer(id) + "assets/" + id; + string uri = MapServer(id) + "/assets/" + id; if (SynchronousRestObjectRequester. MakeRequest("DELETE", uri, 0)) -- cgit v1.1 From b9d026666dbabb210cc013d29eb79fe214594dd9 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 6 Sep 2012 17:11:44 +0200 Subject: Change string concatenation to Path.Combine to eliminate extra slashes. Windoze barfs on them. --- .../Services/Connectors/Asset/AssetServicesConnector.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index 45ebf3a..2a3dacc 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs @@ -181,7 +181,7 @@ namespace OpenSim.Services.Connectors public AssetBase Get(string id) { - string uri = MapServer(id) + "/assets/" + id; + string uri = Path.Combine(MapServer(id), Path.Combine("assets", id)); AssetBase asset = null; if (m_Cache != null) @@ -218,7 +218,7 @@ namespace OpenSim.Services.Connectors return fullAsset.Metadata; } - string uri = MapServer(id) + "/assets/" + id + "/metadata"; + string uri = Path.Combine(MapServer(id), Path.Combine("assets", id)); AssetMetadata asset = SynchronousRestObjectRequester. MakeRequest("GET", uri, 0); @@ -260,7 +260,7 @@ namespace OpenSim.Services.Connectors public bool Get(string id, Object sender, AssetRetrieved handler) { - string uri = MapServer(id) + "/assets/" + id; + string uri = Path.Combine(MapServer(id), Path.Combine("assets", id)); AssetBase asset = null; if (m_Cache != null) @@ -379,7 +379,9 @@ namespace OpenSim.Services.Connectors return asset.ID; } - string uri = MapServer(asset.FullID.ToString()) + "/assets/"; + string uri = Path.Combine(MapServer(asset.FullID.ToString()), "/assets/"); + if (!uri.EndsWith("/")) + uri += "/"; string newID = string.Empty; try @@ -456,7 +458,7 @@ namespace OpenSim.Services.Connectors } asset.Data = data; - string uri = MapServer(id) + "/assets/" + id; + string uri = Path.Combine(MapServer(id), Path.Combine("assets", id)); if (SynchronousRestObjectRequester. MakeRequest("POST", uri, asset)) @@ -471,7 +473,7 @@ namespace OpenSim.Services.Connectors public bool Delete(string id) { - string uri = MapServer(id) + "/assets/" + id; + string uri = Path.Combine(MapServer(id), Path.Combine("assets", id)); if (SynchronousRestObjectRequester. MakeRequest("DELETE", uri, 0)) -- cgit v1.1 From 3257f4d5d21116e9fb8e08f3277b3521d38bc11c Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 6 Sep 2012 17:31:41 +0200 Subject: Revert "Change string concatenation to Path.Combine to eliminate extra slashes." This reverts commit b9d026666dbabb210cc013d29eb79fe214594dd9. --- .../Services/Connectors/Asset/AssetServicesConnector.cs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index 2a3dacc..45ebf3a 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs @@ -181,7 +181,7 @@ namespace OpenSim.Services.Connectors public AssetBase Get(string id) { - string uri = Path.Combine(MapServer(id), Path.Combine("assets", id)); + string uri = MapServer(id) + "/assets/" + id; AssetBase asset = null; if (m_Cache != null) @@ -218,7 +218,7 @@ namespace OpenSim.Services.Connectors return fullAsset.Metadata; } - string uri = Path.Combine(MapServer(id), Path.Combine("assets", id)); + string uri = MapServer(id) + "/assets/" + id + "/metadata"; AssetMetadata asset = SynchronousRestObjectRequester. MakeRequest("GET", uri, 0); @@ -260,7 +260,7 @@ namespace OpenSim.Services.Connectors public bool Get(string id, Object sender, AssetRetrieved handler) { - string uri = Path.Combine(MapServer(id), Path.Combine("assets", id)); + string uri = MapServer(id) + "/assets/" + id; AssetBase asset = null; if (m_Cache != null) @@ -379,9 +379,7 @@ namespace OpenSim.Services.Connectors return asset.ID; } - string uri = Path.Combine(MapServer(asset.FullID.ToString()), "/assets/"); - if (!uri.EndsWith("/")) - uri += "/"; + string uri = MapServer(asset.FullID.ToString()) + "/assets/"; string newID = string.Empty; try @@ -458,7 +456,7 @@ namespace OpenSim.Services.Connectors } asset.Data = data; - string uri = Path.Combine(MapServer(id), Path.Combine("assets", id)); + string uri = MapServer(id) + "/assets/" + id; if (SynchronousRestObjectRequester. MakeRequest("POST", uri, asset)) @@ -473,7 +471,7 @@ namespace OpenSim.Services.Connectors public bool Delete(string id) { - string uri = Path.Combine(MapServer(id), Path.Combine("assets", id)); + string uri = MapServer(id) + "/assets/" + id; if (SynchronousRestObjectRequester. MakeRequest("DELETE", uri, 0)) -- cgit v1.1 From ac6448810e999c4c0c0035fff43b45db9a094094 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 6 Sep 2012 17:39:30 +0200 Subject: Prevent double slashes, try #3 --- OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index 45ebf3a..091e41a 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs @@ -126,6 +126,9 @@ namespace OpenSim.Services.Connectors // m_log.DebugFormat("[ASSET]: Using {0} for host name for prefix {1}", host, prefix); + string ret = serverUri.Uri.AbsoluteUri; + if (ret.EndsWith("/")) + ret = ret.Substring(0, ret.Length - 1); return serverUri.Uri.AbsoluteUri; } -- cgit v1.1 From f53ca6285bc21155a2fdad953b9063a4f8cd5d21 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 6 Sep 2012 18:41:21 +0100 Subject: Prevent double slashes, try #4 --- OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index 091e41a..9e04601 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs @@ -129,7 +129,7 @@ namespace OpenSim.Services.Connectors string ret = serverUri.Uri.AbsoluteUri; if (ret.EndsWith("/")) ret = ret.Substring(0, ret.Length - 1); - return serverUri.Uri.AbsoluteUri; + return ret; } protected void retryCheck(object source, ElapsedEventArgs e) -- cgit v1.1 From 23be1cf1cd0722d48e7e15d2e2bb4e85eef1016e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 7 Sep 2012 09:40:28 +0100 Subject: remove fireandforget call to EnableChildAgents at end on CompleteMovement, since this is already on own thread and its at the end of it. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 433efc7..a8aa551 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1315,13 +1315,15 @@ namespace OpenSim.Region.Framework.Scenes // Create child agents in neighbouring regions if (openChildAgents && !IsChildAgent) { + IEntityTransferModule m_agentTransfer = m_scene.RequestModuleInterface(); if (m_agentTransfer != null) - Util.FireAndForget(delegate { m_agentTransfer.EnableChildAgents(this); }); + m_agentTransfer.EnableChildAgents(this); IFriendsModule friendsModule = m_scene.RequestModuleInterface(); if (friendsModule != null) friendsModule.SendFriendsOnlineIfNeeded(ControllingClient); + } // m_log.DebugFormat( -- cgit v1.1 From c83dd021f300a4272c8a869d20087dac29992c6d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 7 Sep 2012 11:37:51 +0100 Subject: stop sending duplicated parcelProprieties at login --- .../CoreModules/World/Land/LandManagementModule.cs | 57 +++++++++++++++------- 1 file changed, 39 insertions(+), 18 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 8bc81ae..aae6603 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs @@ -401,30 +401,51 @@ namespace OpenSim.Region.CoreModules.World.Land public void SendLandUpdate(ScenePresence avatar, bool force) { + + /* stop sendind same data twice + ILandObject over = GetLandObject((int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.X))), + (int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.Y)))); + + if (over != null) + { + + if (force) + { + if (!avatar.IsChildAgent) + { + over.SendLandUpdateToClient(avatar.ControllingClient); + m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID, + m_scene.RegionInfo.RegionID); + } + } + + if (avatar.currentParcelUUID != over.LandData.GlobalID) + { + if (!avatar.IsChildAgent) + { + over.SendLandUpdateToClient(avatar.ControllingClient); + avatar.currentParcelUUID = over.LandData.GlobalID; + m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID, + m_scene.RegionInfo.RegionID); + } + } + */ + if (avatar.IsChildAgent) + return; + ILandObject over = GetLandObject((int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.X))), - (int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.Y)))); + (int)Math.Min(((int)Constants.RegionSize - 1), Math.Max(0, Math.Round(avatar.AbsolutePosition.Y)))); if (over != null) { - if (force) + bool NotsameID = (avatar.currentParcelUUID != over.LandData.GlobalID); + if (force || NotsameID) { - if (!avatar.IsChildAgent) - { - over.SendLandUpdateToClient(avatar.ControllingClient); - m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID, - m_scene.RegionInfo.RegionID); - } - } - - if (avatar.currentParcelUUID != over.LandData.GlobalID) - { - if (!avatar.IsChildAgent) - { - over.SendLandUpdateToClient(avatar.ControllingClient); + over.SendLandUpdateToClient(avatar.ControllingClient); + if (NotsameID) avatar.currentParcelUUID = over.LandData.GlobalID; - m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID, - m_scene.RegionInfo.RegionID); - } + m_scene.EventManager.TriggerAvatarEnteringNewParcel(avatar, over.LandData.LocalID, + m_scene.RegionInfo.RegionID); } } } -- cgit v1.1 From 71d2d327d075824d9a9d3e4cd22c8a460301b837 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 7 Sep 2012 12:50:38 +0100 Subject: One more redundante ParcelProprieties on login --- OpenSim/Region/Framework/Scenes/Scene.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 0237021..0dae946 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2890,9 +2890,11 @@ namespace OpenSim.Region.Framework.Scenes { EventManager.TriggerOnClientLogin(client); // Send initial parcel data +/* this is done on TriggerOnNewClient by landmanegement respective event handler Vector3 pos = sp.AbsolutePosition; ILandObject land = LandChannel.GetLandObject(pos.X, pos.Y); land.SendLandUpdateToClient(client); +*/ } return sp; -- cgit v1.1 From b379e790a279a0ed70d2c889c12ecb6849765e02 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 7 Sep 2012 23:27:40 +0200 Subject: Set the maximum number of concurrent connections to a service endpoint to 50. This doesn't work on stock mono but it works in Avination and also under Windoze. --- OpenSim/Region/Application/Application.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index ebfebc4..0dbb95a 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs @@ -27,6 +27,7 @@ using System; using System.IO; +using System.Net; using System.Reflection; using log4net; using log4net.Config; @@ -73,6 +74,7 @@ namespace OpenSim AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); + ServicePointManager.DefaultConnectionLimit = 50; // Add the arguments supplied when running the application to the configuration ArgvConfigSource configSource = new ArgvConfigSource(args); -- cgit v1.1 From a91ca984d57a4177ff31898e384ee85948d4eff1 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 8 Sep 2012 12:22:40 +0100 Subject: llClientView: try to have only one thread per client processing RegionHandleRequests. (code assumes packet handle is called async as it is not) --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 53 ++++++++++++++++++++-- 1 file changed, 49 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index e78ebed..7749ef3 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -8751,16 +8751,61 @@ namespace OpenSim.Region.ClientStack.LindenUDP #region Parcel related packets + // acumulate several HandleRegionHandleRequest consecutive overlaping requests + // to be done with minimal resources as possible + // variables temporary here while in test + + Queue RegionHandleRequests = new Queue(); + bool RegionHandleRequestsInService = false; + private bool HandleRegionHandleRequest(IClientAPI sender, Packet Pack) { - RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack; + UUID currentUUID; RegionHandleRequest handlerRegionHandleRequest = OnRegionHandleRequest; - if (handlerRegionHandleRequest != null) + + if (handlerRegionHandleRequest == null) + return true; + + RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack; + + lock (RegionHandleRequests) + { + if (RegionHandleRequestsInService) + { + // we are already busy doing a previus request + // so enqueue it + RegionHandleRequests.Enqueue(rhrPack.RequestBlock.RegionID); + return true; + } + + // else do it + currentUUID = rhrPack.RequestBlock.RegionID; + RegionHandleRequestsInService = true; + } + + while (true) { - handlerRegionHandleRequest(this, rhrPack.RequestBlock.RegionID); + handlerRegionHandleRequest(this, currentUUID); + + lock (RegionHandleRequests) + { + // exit condition, nothing to do or closed + // current code seems to assume we may loose the handler at anytime, + // so keep checking it + handlerRegionHandleRequest = OnRegionHandleRequest; + + if (RegionHandleRequests.Count == 0 || !IsActive || handlerRegionHandleRequest == null) + { + RegionHandleRequests.Clear(); + RegionHandleRequestsInService = false; + return true; + } + currentUUID = RegionHandleRequests.Dequeue(); + } } - return true; + + return true; // actually unreached } private bool HandleParcelInfoRequest(IClientAPI sender, Packet Pack) -- cgit v1.1 From 0556bbefdda9643abf4bbba08ab8e3f066501b74 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 9 Sep 2012 16:30:01 +0200 Subject: Catch zero UUIDs in LSL and shout as an error. Also catch attempts to send IM to UUID.Zero because it ties up XMLRPC handlers needlessly. --- .../Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | 3 +++ OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs index 1406aae..0c067d7 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs @@ -137,6 +137,9 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage { UUID toAgentID = new UUID(im.toAgentID); + if (toAgentID == UUID.Zero) + return; + // Try root avatar only first foreach (Scene scene in m_Scenes) { diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index d5e611c..f9b4bfd 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3420,7 +3420,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llInstantMessage(string user, string message) { UUID result; - if (!UUID.TryParse(user, out result)) + if (!UUID.TryParse(user, out result) || result == UUID.Zero) { ShoutError("An invalid key was passed to llInstantMessage"); ScriptSleep(2000); -- cgit v1.1 From afb4e06f63dd6a532c85b71f0d6c486ae38815fe Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 9 Sep 2012 17:41:10 +0200 Subject: Reduce max concurrent endpoint connections from 50 to 6 (was 2 before) --- OpenSim/Region/Application/Application.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index 0dbb95a..78636c4 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs @@ -74,7 +74,7 @@ namespace OpenSim AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); - ServicePointManager.DefaultConnectionLimit = 50; + ServicePointManager.DefaultConnectionLimit = 6; // Add the arguments supplied when running the application to the configuration ArgvConfigSource configSource = new ArgvConfigSource(args); -- cgit v1.1 From b7737b7273e87fcd9159d81f9cdc784381f94a25 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 10 Sep 2012 01:20:34 +0100 Subject: webFetchInventory: change control event to simple flag, adjust locking --- .../Linden/Caps/WebFetchInvDescModule.cs | 43 ++++++++++++++++------ 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index b77ead3..2475b1f 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs @@ -60,11 +60,12 @@ namespace OpenSim.Region.ClientStack.Linden private WebFetchInvDescHandler m_webFetchHandler; - private ManualResetEvent m_ev = new ManualResetEvent(true); +// private ManualResetEvent m_ev = new ManualResetEvent(true); private object m_lock = new object(); private Dictionary m_capsDict = new Dictionary(); private Dictionary m_requests = new Dictionary(); + bool m_busy = false; #region ISharedRegionModule Members @@ -116,7 +117,9 @@ namespace OpenSim.Region.ClientStack.Linden string capUrl = "/CAPS/" + UUID.Random() + "/"; // Register this as a poll service + // absurd large timeout to tune later to make a bit less than viewer PollServiceEventArgs args = new PollServiceEventArgs(HttpRequestHandler, HasEvents, GetEvents, NoEvents, agentID, 300000); + args.Type = PollServiceEventArgs.EventType.Inventory; MainServer.Instance.AddPollServiceHTTPHandler(capUrl, args); @@ -133,6 +136,8 @@ namespace OpenSim.Region.ClientStack.Linden caps.RegisterHandler("FetchInventoryDescendents2", String.Format("{0}://{1}:{2}{3}", protocol, hostName, port, capUrl)); m_capsDict[agentID] = capUrl; + + m_busy = false; } private void DeregisterCaps(UUID agentID, Caps caps) @@ -149,25 +154,30 @@ namespace OpenSim.Region.ClientStack.Linden public void HttpRequestHandler(UUID requestID, Hashtable request) { // m_log.DebugFormat("[FETCH2]: Received request {0}", requestID); - m_requests[requestID] = request; + lock(m_lock) + m_requests[requestID] = request; } private bool HasEvents(UUID requestID, UUID sessionID) { lock (m_lock) { +/* if (m_ev.WaitOne(0)) { m_ev.Reset(); return true; } return false; + */ + return !m_busy; } } private Hashtable NoEvents(UUID requestID, UUID sessionID) { - m_requests.Remove(requestID); + lock(m_lock) + m_requests.Remove(requestID); Hashtable response = new Hashtable(); @@ -177,11 +187,17 @@ namespace OpenSim.Region.ClientStack.Linden response["keepalive"] = false; response["reusecontext"] = false; + lock (m_lock) + m_busy = false; + return response; } private Hashtable GetEvents(UUID requestID, UUID sessionID, string request) { + lock (m_lock) + m_busy = true; + Hashtable response = new Hashtable(); response["int_response_code"] = 500; @@ -192,20 +208,24 @@ namespace OpenSim.Region.ClientStack.Linden try { + Hashtable requestHash; - if (!m_requests.TryGetValue(requestID, out requestHash)) + lock (m_lock) { - lock (m_lock) - m_ev.Set(); - response["str_response_string"] = "Invalid request"; - return response; + if (!m_requests.TryGetValue(requestID, out requestHash)) + { + m_busy = false; + // m_ev.Set(); + response["str_response_string"] = "Invalid request"; + return response; + } + m_requests.Remove(requestID); } // m_log.DebugFormat("[FETCH2]: Processed request {0}", requestID); string reply = m_webFetchHandler.FetchInventoryDescendentsRequest(requestHash["body"].ToString(), String.Empty, String.Empty, null, null); - - m_requests.Remove(requestID); + response["int_response_code"] = 200; response["str_response_string"] = reply; @@ -213,7 +233,8 @@ namespace OpenSim.Region.ClientStack.Linden finally { lock (m_lock) - m_ev.Set(); +// m_ev.Set(); + m_busy = false; } return response; -- cgit v1.1 From a7250c6ea16971327f28296bdef9a264cf61efc0 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 10 Sep 2012 01:23:20 +0100 Subject: add a extra httppool thread to compensate for webfetchinventory --- OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index e45cb89..7384e39 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -1618,7 +1618,8 @@ namespace OpenSim.Framework.Servers.HttpServer m_httpListener2.Start(64); // Long Poll Service Manager with 3 worker threads a 25 second timeout for no events - m_PollServiceManager = new PollServiceRequestManager(this, 3, 25000); +// m_PollServiceManager = new PollServiceRequestManager(this, 3, 25000); + m_PollServiceManager = new PollServiceRequestManager(this, 4, 25000); HTTPDRunning = true; //HttpListenerContext context; -- cgit v1.1 From 657428a43906c5e65ad56ed96fa05d82f84d6c9b Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 10 Sep 2012 01:52:02 +0200 Subject: Remove commented code --- .../Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index 2475b1f..e996fe8 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs @@ -60,7 +60,6 @@ namespace OpenSim.Region.ClientStack.Linden private WebFetchInvDescHandler m_webFetchHandler; -// private ManualResetEvent m_ev = new ManualResetEvent(true); private object m_lock = new object(); private Dictionary m_capsDict = new Dictionary(); @@ -162,14 +161,6 @@ namespace OpenSim.Region.ClientStack.Linden { lock (m_lock) { -/* - if (m_ev.WaitOne(0)) - { - m_ev.Reset(); - return true; - } - return false; - */ return !m_busy; } } @@ -215,7 +206,6 @@ namespace OpenSim.Region.ClientStack.Linden if (!m_requests.TryGetValue(requestID, out requestHash)) { m_busy = false; - // m_ev.Set(); response["str_response_string"] = "Invalid request"; return response; } @@ -233,7 +223,6 @@ namespace OpenSim.Region.ClientStack.Linden finally { lock (m_lock) -// m_ev.Set(); m_busy = false; } -- cgit v1.1