From 8e542cfa03f9368368a0f73fbcff0d54622b5588 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 6 Dec 2011 21:42:56 +0000 Subject: Stop accidentally setting up the UploadTexture caps handler with the same url for all users This meant that if a user exited the region, the UploadTexture handler would be effectively removed for everyone, causing subsequent failures. This hopefully resolves the recent UploadTexture LLSD problems This was a regression in 5640f2e (Thu Dec 1 23:24:15 2011 +0000) --- OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs index e61815f..45d6071 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs @@ -104,7 +104,7 @@ namespace OpenSim.Region.ClientStack.Linden "UploadBakedTexture", new RestStreamHandler( "POST", - "/CAPS/" + m_uploadBakedTexturePath, + "/CAPS/" + caps.CapsObjectPath + m_uploadBakedTexturePath, new UploadBakedTextureHandler( caps, m_scene.AssetService, m_persistBakedTextures).UploadBakedTexture)); } -- cgit v1.1 From e6272b8d56dd7856faf374e7ac29460b4e74f1bb Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 7 Dec 2011 12:28:42 +0000 Subject: Stop also adding an ordinary http handler when we set up a poll http handler. It appears that this is entirely unnecessary since the poll http handlers are dealt with on a separate code path. --- .../Linden/Caps/EventQueue/EventQueueGetModule.cs | 6 ------ .../Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | 17 ++++++----------- 2 files changed, 6 insertions(+), 17 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 9f27abc..8ba6f61 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -361,7 +361,6 @@ namespace OpenSim.Region.ClientStack.Linden // This will persist this beyond the expiry of the caps handlers MainServer.Instance.AddPollServiceHTTPHandler( capsBase + EventQueueGetUUID.ToString() + "/", - EventQueuePoll, new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID)); Random rnd = new Random(Environment.TickCount); @@ -578,11 +577,6 @@ namespace OpenSim.Region.ClientStack.Linden // return responsedata; // } - public Hashtable EventQueuePoll(Hashtable request) - { - return new Hashtable(); - } - // public Hashtable EventQueuePath2(Hashtable request) // { // string capuuid = (string)request["uri"]; //path.Replace("/CAPS/EQG/",""); diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index 7377ceb..67d99e0 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs @@ -90,11 +90,6 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp get { return null; } } - private Hashtable HandleHttpPoll(Hashtable request) - { - return new Hashtable(); - } - public string Name { get { return "UrlModule"; } @@ -171,9 +166,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp string uri = "/lslhttp/" + urlcode.ToString() + "/"; - m_HttpServer.AddPollServiceHTTPHandler(uri,HandleHttpPoll, - new PollServiceEventArgs(HttpRequestHandler,HasEvents, GetEvents, NoEvents, - urlcode)); + m_HttpServer.AddPollServiceHTTPHandler( + uri, + new PollServiceEventArgs(HttpRequestHandler, HasEvents, GetEvents, NoEvents, urlcode)); engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url }); } @@ -213,9 +208,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp string uri = "/lslhttps/" + urlcode.ToString() + "/"; - m_HttpsServer.AddPollServiceHTTPHandler(uri,HandleHttpPoll, - new PollServiceEventArgs(HttpRequestHandler,HasEvents, GetEvents, NoEvents, - urlcode)); + m_HttpsServer.AddPollServiceHTTPHandler( + uri, + new PollServiceEventArgs(HttpRequestHandler, HasEvents, GetEvents, NoEvents, urlcode)); engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url }); } -- cgit v1.1 From 33c6067098a452eec36721b833668f9662b99100 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Wed, 7 Dec 2011 11:21:50 -0500 Subject: Trigger a Jenkins build --- OpenSim/Region/Application/OpenSimBase.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index bae44ee..55ba18a 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -62,6 +62,7 @@ namespace OpenSim // These are the names of the plugin-points extended by this // class during system startup. + // private const string PLUGIN_ASSET_CACHE = "/OpenSim/AssetCache"; private const string PLUGIN_ASSET_SERVER_CLIENT = "/OpenSim/AssetClient"; -- cgit v1.1 From 415b7b7ec4be9f87e7d5b65000e092d3372a4391 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 7 Dec 2011 17:31:57 +0000 Subject: Implement XMLRPCAdmin command admin_teleport_agent. This allows someone with access to this command on the XMLRPCAdmin interface to teleport an avatar to an arbitrary region and/or position. --- OpenSim/Region/Framework/Scenes/Scene.cs | 6 ++--- OpenSim/Region/Framework/Scenes/SceneBase.cs | 6 +++++ OpenSim/Region/Framework/Scenes/SceneManager.cs | 33 +++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 3ac6327..604f035 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4206,7 +4206,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void ForEachRootScenePresence(Action action) { - if(m_sceneGraph != null) + if (m_sceneGraph != null) { m_sceneGraph.ForEachAvatar(action); } @@ -4286,9 +4286,9 @@ namespace OpenSim.Region.Framework.Scenes return m_sceneGraph.GetGroupByPrim(localID); } - public override bool TryGetScenePresence(UUID avatarId, out ScenePresence avatar) + public override bool TryGetScenePresence(UUID agentID, out ScenePresence sp) { - return m_sceneGraph.TryGetScenePresence(avatarId, out avatar); + return m_sceneGraph.TryGetScenePresence(agentID, out sp); } public bool TryGetAvatarByName(string avatarName, out ScenePresence avatar) diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs index 0336fe5..a633c72 100644 --- a/OpenSim/Region/Framework/Scenes/SceneBase.cs +++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs @@ -191,6 +191,12 @@ namespace OpenSim.Region.Framework.Scenes return false; } + /// + /// Try to get a scene presence from the scene + /// + /// + /// null if there is no scene presence with the given agent id + /// true if there was a scene presence with the given id, false otherwise. public abstract bool TryGetScenePresence(UUID agentID, out ScenePresence scenePresence); #endregion diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs index 82458e2..0491205 100644 --- a/OpenSim/Region/Framework/Scenes/SceneManager.cs +++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs @@ -545,6 +545,23 @@ namespace OpenSim.Region.Framework.Scenes return false; } + public bool TryGetRootScenePresence(UUID avatarId, out ScenePresence avatar) + { + lock (m_localScenes) + { + foreach (Scene scene in m_localScenes) + { + avatar = scene.GetScenePresence(avatarId); + + if (avatar != null && !avatar.IsChildAgent) + return true; + } + } + + avatar = null; + return false; + } + public bool TryGetAvatarsScene(UUID avatarId, out Scene scene) { ScenePresence avatar = null; @@ -590,6 +607,22 @@ namespace OpenSim.Region.Framework.Scenes return false; } + public bool TryGetRootScenePresenceByName(string firstName, string lastName, out ScenePresence sp) + { + lock (m_localScenes) + { + foreach (Scene scene in m_localScenes) + { + sp = scene.GetScenePresence(firstName, lastName); + if (sp != null && !sp.IsChildAgent) + return true; + } + } + + sp = null; + return false; + } + public void ForEachScene(Action action) { lock (m_localScenes) -- cgit v1.1 From 3d95015686cafd7e5510d649fc58328c9565768b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 7 Dec 2011 18:43:48 +0000 Subject: On an Exception in Scene.RemoveClient(), always remove the client (and SP) structure so that logout on unexpired packets isn't retriggered, causing the same exception --- OpenSim/Region/Framework/Scenes/Scene.cs | 47 +++++++++++++++++++------------- 1 file changed, 28 insertions(+), 19 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 604f035..87af206 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3104,29 +3104,38 @@ namespace OpenSim.Region.Framework.Scenes // Avatar is already disposed :/ } - m_eventManager.TriggerOnRemovePresence(agentID); - - if (AttachmentsModule != null && !avatar.IsChildAgent && avatar.PresenceType != PresenceType.Npc) - AttachmentsModule.SaveChangedAttachments(avatar); - - ForEachClient( - delegate(IClientAPI client) + try + { + m_eventManager.TriggerOnRemovePresence(agentID); + + if (AttachmentsModule != null && !avatar.IsChildAgent && avatar.PresenceType != PresenceType.Npc) + AttachmentsModule.SaveChangedAttachments(avatar); + + ForEachClient( + delegate(IClientAPI client) + { + //We can safely ignore null reference exceptions. It means the avatar is dead and cleaned up anyway + try { client.SendKillObject(avatar.RegionHandle, new List { avatar.LocalId }); } + catch (NullReferenceException) { } + }); + + IAgentAssetTransactions agentTransactions = this.RequestModuleInterface(); + if (agentTransactions != null) { - //We can safely ignore null reference exceptions. It means the avatar is dead and cleaned up anyway - try { client.SendKillObject(avatar.RegionHandle, new List { avatar.LocalId }); } - catch (NullReferenceException) { } - }); - - IAgentAssetTransactions agentTransactions = this.RequestModuleInterface(); - if (agentTransactions != null) + agentTransactions.RemoveAgentAssetTransactions(agentID); + } + } + finally { - agentTransactions.RemoveAgentAssetTransactions(agentID); + // Always clean these structures up so that any failure above doesn't cause them to remain in the + // scene with possibly bad effects (e.g. continually timing out on unacked packets and triggering + // the same cleanup exception continually. + // TODO: This should probably extend to the whole method, but we don't want to also catch the NRE + // since this would hide the underlying failure and other associated problems. + m_sceneGraph.RemoveScenePresence(agentID); + m_clientManager.Remove(agentID); } - // Remove the avatar from the scene - m_sceneGraph.RemoveScenePresence(agentID); - m_clientManager.Remove(agentID); - try { avatar.Close(); -- cgit v1.1 From eda770e978c09c756d15ba62dbbf6ee34a61b2f5 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 7 Dec 2011 21:15:55 +0000 Subject: Remove unused SceneManager.TryGetAvatarsScene() It makes far more sense anyway to use TryGetRootScenePresence().Scene, in common with the rest of the code This method could also return any scene for child or root agents, depending in which order the scenes happened to lie in the list --- OpenSim/Region/Framework/Scenes/SceneManager.cs | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs index 0491205..d73a959 100644 --- a/OpenSim/Region/Framework/Scenes/SceneManager.cs +++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs @@ -562,26 +562,6 @@ namespace OpenSim.Region.Framework.Scenes return false; } - public bool TryGetAvatarsScene(UUID avatarId, out Scene scene) - { - ScenePresence avatar = null; - - lock (m_localScenes) - { - foreach (Scene mScene in m_localScenes) - { - if (mScene.TryGetScenePresence(avatarId, out avatar)) - { - scene = mScene; - return true; - } - } - } - - scene = null; - return false; - } - public void CloseScene(Scene scene) { lock (m_localScenes) -- cgit v1.1