aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorDan Lake2012-07-18 13:07:07 -0700
committerDan Lake2012-07-18 13:07:07 -0700
commitdd85d7d981a93b44c264695020768f8b7399ab31 (patch)
treee5d31df36914e3e330c9b7333d200145a57d2bd8 /OpenSim/Region/Framework
parentMissing parameter in log error message was throwing exception (diff)
parentClose() the ScenePresence after we've removed it from the scene graph, to cut... (diff)
downloadopensim-SC-dd85d7d981a93b44c264695020768f8b7399ab31.zip
opensim-SC-dd85d7d981a93b44c264695020768f8b7399ab31.tar.gz
opensim-SC-dd85d7d981a93b44c264695020768f8b7399ab31.tar.bz2
opensim-SC-dd85d7d981a93b44c264695020768f8b7399ab31.tar.xz
Merge branch 'master' of git://opensimulator.org/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IScriptModule.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs14
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs26
3 files changed, 16 insertions, 26 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IScriptModule.cs b/OpenSim/Region/Framework/Interfaces/IScriptModule.cs
index 42dbedc..143af48 100644
--- a/OpenSim/Region/Framework/Interfaces/IScriptModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IScriptModule.cs
@@ -77,8 +77,6 @@ namespace OpenSim.Region.Framework.Interfaces
77 /// <param name="itemID">The item ID of the script.</param> 77 /// <param name="itemID">The item ID of the script.</param>
78 bool GetScriptState(UUID itemID); 78 bool GetScriptState(UUID itemID);
79 79
80 void SetRunEnable(UUID instanceID, bool enable);
81
82 void SaveAllState(); 80 void SaveAllState();
83 81
84 /// <summary> 82 /// <summary>
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 9ff8467..e413281 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -2143,24 +2143,10 @@ namespace OpenSim.Region.Framework.Scenes
2143 if (part == null) 2143 if (part == null)
2144 return; 2144 return;
2145 2145
2146 IScriptModule[] engines = RequestModuleInterfaces<IScriptModule>();
2147
2148 if (running) 2146 if (running)
2149 {
2150 foreach (IScriptModule engine in engines)
2151 {
2152 engine.SetRunEnable(itemID, true);
2153 }
2154 EventManager.TriggerStartScript(part.LocalId, itemID); 2147 EventManager.TriggerStartScript(part.LocalId, itemID);
2155 }
2156 else 2148 else
2157 {
2158 foreach (IScriptModule engine in engines)
2159 {
2160 engine.SetRunEnable(itemID, false);
2161 }
2162 EventManager.TriggerStopScript(part.LocalId, itemID); 2149 EventManager.TriggerStopScript(part.LocalId, itemID);
2163 }
2164 } 2150 }
2165 2151
2166 public void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID) 2152 public void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID)
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 3e9583c..de2b192 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3317,24 +3317,30 @@ namespace OpenSim.Region.Framework.Scenes
3317 if (AgentTransactionsModule != null) 3317 if (AgentTransactionsModule != null)
3318 AgentTransactionsModule.RemoveAgentAssetTransactions(agentID); 3318 AgentTransactionsModule.RemoveAgentAssetTransactions(agentID);
3319 3319
3320 avatar.Close();
3321
3322 m_authenticateHandler.RemoveCircuit(avatar.ControllingClient.CircuitCode); 3320 m_authenticateHandler.RemoveCircuit(avatar.ControllingClient.CircuitCode);
3323 } 3321 }
3324 catch (Exception e) 3322 catch (Exception e)
3325 { 3323 {
3326 m_log.Error( 3324 m_log.Error(
3327 string.Format("[SCENE]: Exception removing {0} from {1}, ", avatar.Name, RegionInfo.RegionName), e); 3325 string.Format("[SCENE]: Exception removing {0} from {1}. Cleaning up. Exception ", avatar.Name, Name), e);
3328 } 3326 }
3329 finally 3327 finally
3330 { 3328 {
3331 // Always clean these structures up so that any failure above doesn't cause them to remain in the 3329 try
3332 // scene with possibly bad effects (e.g. continually timing out on unacked packets and triggering 3330 {
3333 // the same cleanup exception continually. 3331 // Always clean these structures up so that any failure above doesn't cause them to remain in the
3334 // TODO: This should probably extend to the whole method, but we don't want to also catch the NRE 3332 // scene with possibly bad effects (e.g. continually timing out on unacked packets and triggering
3335 // since this would hide the underlying failure and other associated problems. 3333 // the same cleanup exception continually.
3336 m_sceneGraph.RemoveScenePresence(agentID); 3334 m_sceneGraph.RemoveScenePresence(agentID);
3337 m_clientManager.Remove(agentID); 3335 m_clientManager.Remove(agentID);
3336
3337 avatar.Close();
3338 }
3339 catch (Exception e)
3340 {
3341 m_log.Error(
3342 string.Format("[SCENE]: Exception in final clean up of {0} in {1}. Exception ", avatar.Name, Name), e);
3343 }
3338 } 3344 }
3339 3345
3340 //m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false)); 3346 //m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false));