aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs154
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs31
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs24
3 files changed, 106 insertions, 103 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
index 33b4839..8ff20dd 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs
@@ -38,15 +38,15 @@ using OpenSim.Services.Interfaces;
38 38
39namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer 39namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
40{ 40{
41 public class InventoryTransferModule : IInventoryTransferModule, ISharedRegionModule 41 public class InventoryTransferModule : ISharedRegionModule
42 { 42 {
43 private static readonly ILog m_log 43 private static readonly ILog m_log
44 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 /// <summary> 46 /// <summary>
47 private List<Scene> m_Scenelist = new List<Scene>(); 47 private List<Scene> m_Scenelist = new List<Scene>();
48 private Dictionary<UUID, Scene> m_AgentRegions = 48// private Dictionary<UUID, Scene> m_AgentRegions =
49 new Dictionary<UUID, Scene>(); 49// new Dictionary<UUID, Scene>();
50 50
51 private IMessageTransferModule m_TransferModule = null; 51 private IMessageTransferModule m_TransferModule = null;
52 private bool m_Enabled = true; 52 private bool m_Enabled = true;
@@ -76,12 +76,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
76 76
77 m_Scenelist.Add(scene); 77 m_Scenelist.Add(scene);
78 78
79 scene.RegisterModuleInterface<IInventoryTransferModule>(this); 79// scene.RegisterModuleInterface<IInventoryTransferModule>(this);
80 80
81 scene.EventManager.OnNewClient += OnNewClient; 81 scene.EventManager.OnNewClient += OnNewClient;
82 scene.EventManager.OnClientClosed += ClientLoggedOut; 82// scene.EventManager.OnClientClosed += ClientLoggedOut;
83 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage; 83 scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
84 scene.EventManager.OnSetRootAgentScene += OnSetRootAgentScene; 84// scene.EventManager.OnSetRootAgentScene += OnSetRootAgentScene;
85 } 85 }
86 86
87 public void RegionLoaded(Scene scene) 87 public void RegionLoaded(Scene scene)
@@ -96,9 +96,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
96 96
97 m_Scenelist.Clear(); 97 m_Scenelist.Clear();
98 scene.EventManager.OnNewClient -= OnNewClient; 98 scene.EventManager.OnNewClient -= OnNewClient;
99 scene.EventManager.OnClientClosed -= ClientLoggedOut; 99// scene.EventManager.OnClientClosed -= ClientLoggedOut;
100 scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage; 100 scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
101 scene.EventManager.OnSetRootAgentScene -= OnSetRootAgentScene; 101// scene.EventManager.OnSetRootAgentScene -= OnSetRootAgentScene;
102 } 102 }
103 } 103 }
104 } 104 }
@@ -106,9 +106,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
106 public void RemoveRegion(Scene scene) 106 public void RemoveRegion(Scene scene)
107 { 107 {
108 scene.EventManager.OnNewClient -= OnNewClient; 108 scene.EventManager.OnNewClient -= OnNewClient;
109 scene.EventManager.OnClientClosed -= ClientLoggedOut; 109// scene.EventManager.OnClientClosed -= ClientLoggedOut;
110 scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage; 110 scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
111 scene.EventManager.OnSetRootAgentScene -= OnSetRootAgentScene; 111// scene.EventManager.OnSetRootAgentScene -= OnSetRootAgentScene;
112 m_Scenelist.Remove(scene); 112 m_Scenelist.Remove(scene);
113 } 113 }
114 114
@@ -138,10 +138,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
138 client.OnInstantMessage += OnInstantMessage; 138 client.OnInstantMessage += OnInstantMessage;
139 } 139 }
140 140
141 protected void OnSetRootAgentScene(UUID id, Scene scene) 141// protected void OnSetRootAgentScene(UUID id, Scene scene)
142 { 142// {
143 m_AgentRegions[id] = scene; 143// m_AgentRegions[id] = scene;
144 } 144// }
145 145
146 private Scene FindClientScene(UUID agentId) 146 private Scene FindClientScene(UUID agentId)
147 { 147 {
@@ -448,69 +448,69 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
448 } 448 }
449 } 449 }
450 450
451 public bool NeedSceneCacheClear(UUID agentID, Scene scene) 451// public bool NeedSceneCacheClear(UUID agentID, Scene scene)
452 { 452// {
453 if (!m_AgentRegions.ContainsKey(agentID)) 453// if (!m_AgentRegions.ContainsKey(agentID))
454 { 454// {
455 // Since we can get here two ways, we need to scan 455// // Since we can get here two ways, we need to scan
456 // the scenes here. This is somewhat more expensive 456// // the scenes here. This is somewhat more expensive
457 // but helps avoid a nasty bug 457// // but helps avoid a nasty bug
458 // 458// //
459 459//
460 foreach (Scene s in m_Scenelist) 460// foreach (Scene s in m_Scenelist)
461 { 461// {
462 ScenePresence presence; 462// ScenePresence presence;
463 463//
464 if (s.TryGetScenePresence(agentID, out presence)) 464// if (s.TryGetScenePresence(agentID, out presence))
465 { 465// {
466 // If the agent is in this scene, then we 466// // If the agent is in this scene, then we
467 // are being called twice in a single 467// // are being called twice in a single
468 // teleport. This is wasteful of cycles 468// // teleport. This is wasteful of cycles
469 // but harmless due to this 2nd level check 469// // but harmless due to this 2nd level check
470 // 470// //
471 // If the agent is found in another scene 471// // If the agent is found in another scene
472 // then the list wasn't current 472// // then the list wasn't current
473 // 473// //
474 // If the agent is totally unknown, then what 474// // If the agent is totally unknown, then what
475 // are we even doing here?? 475// // are we even doing here??
476 // 476// //
477 if (s == scene) 477// if (s == scene)
478 { 478// {
479 //m_log.Debug("[INVTRANSFERMOD]: s == scene. Returning true in " + scene.RegionInfo.RegionName); 479// //m_log.Debug("[INVTRANSFERMOD]: s == scene. Returning true in " + scene.RegionInfo.RegionName);
480 return true; 480// return true;
481 } 481// }
482 else 482// else
483 { 483// {
484 //m_log.Debug("[INVTRANSFERMOD]: s != scene. Returning false in " + scene.RegionInfo.RegionName); 484// //m_log.Debug("[INVTRANSFERMOD]: s != scene. Returning false in " + scene.RegionInfo.RegionName);
485 return false; 485// return false;
486 } 486// }
487 } 487// }
488 } 488// }
489 //m_log.Debug("[INVTRANSFERMOD]: agent not in scene. Returning true in " + scene.RegionInfo.RegionName); 489// //m_log.Debug("[INVTRANSFERMOD]: agent not in scene. Returning true in " + scene.RegionInfo.RegionName);
490 return true; 490// return true;
491 } 491// }
492 492//
493 // The agent is left in current Scene, so we must be 493// // The agent is left in current Scene, so we must be
494 // going to another instance 494// // going to another instance
495 // 495// //
496 if (m_AgentRegions[agentID] == scene) 496// if (m_AgentRegions[agentID] == scene)
497 { 497// {
498 //m_log.Debug("[INVTRANSFERMOD]: m_AgentRegions[agentID] == scene. Returning true in " + scene.RegionInfo.RegionName); 498// //m_log.Debug("[INVTRANSFERMOD]: m_AgentRegions[agentID] == scene. Returning true in " + scene.RegionInfo.RegionName);
499 m_AgentRegions.Remove(agentID); 499// m_AgentRegions.Remove(agentID);
500 return true; 500// return true;
501 } 501// }
502 502//
503 // Another region has claimed the agent 503// // Another region has claimed the agent
504 // 504// //
505 //m_log.Debug("[INVTRANSFERMOD]: last resort. Returning false in " + scene.RegionInfo.RegionName); 505// //m_log.Debug("[INVTRANSFERMOD]: last resort. Returning false in " + scene.RegionInfo.RegionName);
506 return false; 506// return false;
507 } 507// }
508 508//
509 public void ClientLoggedOut(UUID agentID, Scene scene) 509// public void ClientLoggedOut(UUID agentID, Scene scene)
510 { 510// {
511 if (m_AgentRegions.ContainsKey(agentID)) 511// if (m_AgentRegions.ContainsKey(agentID))
512 m_AgentRegions.Remove(agentID); 512// m_AgentRegions.Remove(agentID);
513 } 513// }
514 514
515 /// <summary> 515 /// <summary>
516 /// 516 ///
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 90fe430..7498cfe 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -672,13 +672,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
672 sp.Reset(); 672 sp.Reset();
673 } 673 }
674 674
675 // REFACTORING PROBLEM. Well, not a problem, but this method is HORRIBLE! 675 // Commented pending deletion since this method no longer appears to do anything at all
676 if (sp.Scene.NeedSceneCacheClear(sp.UUID)) 676// // REFACTORING PROBLEM. Well, not a problem, but this method is HORRIBLE!
677 { 677// if (sp.Scene.NeedSceneCacheClear(sp.UUID))
678 m_log.DebugFormat( 678// {
679 "[ENTITY TRANSFER MODULE]: User {0} is going to another region, profile cache removed", 679// m_log.DebugFormat(
680 sp.UUID); 680// "[ENTITY TRANSFER MODULE]: User {0} is going to another region, profile cache removed",
681 } 681// sp.UUID);
682// }
682 683
683 m_entityTransferStateMachine.ResetFromTransit(sp.UUID); 684 m_entityTransferStateMachine.ResetFromTransit(sp.UUID);
684 } 685 }
@@ -1237,14 +1238,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1237 1238
1238 AgentHasMovedAway(agent, false); 1239 AgentHasMovedAway(agent, false);
1239 1240
1240 // the user may change their profile information in other region, 1241// // the user may change their profile information in other region,
1241 // so the userinfo in UserProfileCache is not reliable any more, delete it 1242// // so the userinfo in UserProfileCache is not reliable any more, delete it
1242 // REFACTORING PROBLEM. Well, not a problem, but this method is HORRIBLE! 1243// // REFACTORING PROBLEM. Well, not a problem, but this method is HORRIBLE!
1243 if (agent.Scene.NeedSceneCacheClear(agent.UUID)) 1244// if (agent.Scene.NeedSceneCacheClear(agent.UUID))
1244 { 1245// {
1245 m_log.DebugFormat( 1246// m_log.DebugFormat(
1246 "[ENTITY TRANSFER MODULE]: User {0} is going to another region", agent.UUID); 1247// "[ENTITY TRANSFER MODULE]: User {0} is going to another region", agent.UUID);
1247 } 1248// }
1248 1249
1249 //m_log.Debug("AFTER CROSS"); 1250 //m_log.Debug("AFTER CROSS");
1250 //Scene.DumpChildrenSeeds(UUID); 1251 //Scene.DumpChildrenSeeds(UUID);
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 0f39671..9c61fe7 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3435,9 +3435,10 @@ namespace OpenSim.Region.Framework.Scenes
3435 if (closeChildAgents && CapsModule != null) 3435 if (closeChildAgents && CapsModule != null)
3436 CapsModule.RemoveCaps(agentID); 3436 CapsModule.RemoveCaps(agentID);
3437 3437
3438 // REFACTORING PROBLEM -- well not really a problem, but just to point out that whatever 3438// // REFACTORING PROBLEM -- well not really a problem, but just to point out that whatever
3439 // this method is doing is HORRIBLE!!! 3439// // this method is doing is HORRIBLE!!!
3440 avatar.Scene.NeedSceneCacheClear(avatar.UUID); 3440 // Commented pending deletion since this method no longer appears to do anything at all
3441// avatar.Scene.NeedSceneCacheClear(avatar.UUID);
3441 3442
3442 if (closeChildAgents && !isChildAgent) 3443 if (closeChildAgents && !isChildAgent)
3443 { 3444 {
@@ -4873,14 +4874,15 @@ namespace OpenSim.Region.Framework.Scenes
4873 client.SendRegionHandle(regionID, handle); 4874 client.SendRegionHandle(regionID, handle);
4874 } 4875 }
4875 4876
4876 public bool NeedSceneCacheClear(UUID agentID) 4877// Commented pending deletion since this method no longer appears to do anything at all
4877 { 4878// public bool NeedSceneCacheClear(UUID agentID)
4878 IInventoryTransferModule inv = RequestModuleInterface<IInventoryTransferModule>(); 4879// {
4879 if (inv == null) 4880// IInventoryTransferModule inv = RequestModuleInterface<IInventoryTransferModule>();
4880 return true; 4881// if (inv == null)
4881 4882// return true;
4882 return inv.NeedSceneCacheClear(agentID, this); 4883//
4883 } 4884// return inv.NeedSceneCacheClear(agentID, this);
4885// }
4884 4886
4885 public void CleanTempObjects() 4887 public void CleanTempObjects()
4886 { 4888 {