diff options
author | Justin Clarke Casey | 2009-01-22 17:51:47 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-01-22 17:51:47 +0000 |
commit | 8a24f61acd4623c9a78c9dca41ed7c0fddcdabc7 (patch) | |
tree | 0b6c78aebcde6fbf99936439b4dd839765fbbd23 | |
parent | white space & formatting cleanup (diff) | |
download | opensim-SC_OLD-8a24f61acd4623c9a78c9dca41ed7c0fddcdabc7.zip opensim-SC_OLD-8a24f61acd4623c9a78c9dca41ed7c0fddcdabc7.tar.gz opensim-SC_OLD-8a24f61acd4623c9a78c9dca41ed7c0fddcdabc7.tar.bz2 opensim-SC_OLD-8a24f61acd4623c9a78c9dca41ed7c0fddcdabc7.tar.xz |
* Change the currently misleading log message when capabilities are added twice, and provide some more information
* No functional change
* It strikes me that there may be caps problems if double registration is presented if cleanup failed for a previous agent (so a caps handler will remain in memory for that
agent but with a different seed). This needs investigation
-rw-r--r-- | OpenSim/Region/Environment/Modules/Agent/Capabilities/CapabilitiesModule.cs | 31 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs | 2 |
2 files changed, 17 insertions, 16 deletions
diff --git a/OpenSim/Region/Environment/Modules/Agent/Capabilities/CapabilitiesModule.cs b/OpenSim/Region/Environment/Modules/Agent/Capabilities/CapabilitiesModule.cs index 838851c..070736e 100644 --- a/OpenSim/Region/Environment/Modules/Agent/Capabilities/CapabilitiesModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/Capabilities/CapabilitiesModule.cs | |||
@@ -73,32 +73,33 @@ namespace OpenSim.Region.Environment.Modules.Agent.Capabilities | |||
73 | 73 | ||
74 | String capsObjectPath = GetCapsPath(agentId); | 74 | String capsObjectPath = GetCapsPath(agentId); |
75 | 75 | ||
76 | Caps cap = null; | 76 | if (m_capsHandlers.ContainsKey(agentId)) |
77 | if (m_capsHandlers.TryGetValue(agentId, out cap)) | ||
78 | { | 77 | { |
78 | Caps oldCaps = m_capsHandlers[agentId]; | ||
79 | |||
79 | m_log.DebugFormat( | 80 | m_log.DebugFormat( |
80 | "[CAPS]: Attempt at registering twice for the same agent {0}. {1}. Ignoring.", | 81 | "[CAPS]: Reregistering caps for agent {0}. Old caps path {1}, new caps path {2}", |
81 | agentId, capsObjectPath); | 82 | agentId, oldCaps.CapsObjectPath, capsObjectPath); |
82 | //return; | 83 | //return; |
83 | } | 84 | } |
84 | 85 | ||
85 | cap | 86 | Caps caps |
86 | = new Caps( | 87 | = new Caps( |
87 | m_scene.AssetCache, m_scene.CommsManager.HttpServer, m_scene.RegionInfo.ExternalHostName, | 88 | m_scene.AssetCache, m_scene.CommsManager.HttpServer, m_scene.RegionInfo.ExternalHostName, |
88 | m_scene.CommsManager.HttpServer.Port, | 89 | m_scene.CommsManager.HttpServer.Port, |
89 | capsObjectPath, agentId, m_scene.DumpAssetsToFile, m_scene.RegionInfo.RegionName); | 90 | capsObjectPath, agentId, m_scene.DumpAssetsToFile, m_scene.RegionInfo.RegionName); |
90 | 91 | ||
91 | cap.RegisterHandlers(); | 92 | caps.RegisterHandlers(); |
92 | 93 | ||
93 | m_scene.EventManager.TriggerOnRegisterCaps(agentId, cap); | 94 | m_scene.EventManager.TriggerOnRegisterCaps(agentId, caps); |
94 | 95 | ||
95 | cap.AddNewInventoryItem = m_scene.AddUploadedInventoryItem; | 96 | caps.AddNewInventoryItem = m_scene.AddUploadedInventoryItem; |
96 | cap.ItemUpdatedCall = m_scene.CapsUpdateInventoryItemAsset; | 97 | caps.ItemUpdatedCall = m_scene.CapsUpdateInventoryItemAsset; |
97 | cap.TaskScriptUpdatedCall = m_scene.CapsUpdateTaskInventoryScriptAsset; | 98 | caps.TaskScriptUpdatedCall = m_scene.CapsUpdateTaskInventoryScriptAsset; |
98 | cap.CAPSFetchInventoryDescendents = m_scene.HandleFetchInventoryDescendentsCAPS; | 99 | caps.CAPSFetchInventoryDescendents = m_scene.HandleFetchInventoryDescendentsCAPS; |
99 | cap.GetClient = m_scene.m_sceneGraph.GetControllingClient; | 100 | caps.GetClient = m_scene.m_sceneGraph.GetControllingClient; |
100 | 101 | ||
101 | m_capsHandlers[agentId] = cap; | 102 | m_capsHandlers[agentId] = caps; |
102 | } | 103 | } |
103 | 104 | ||
104 | public void RemoveCapsHandler(UUID agentId) | 105 | public void RemoveCapsHandler(UUID agentId) |
@@ -114,7 +115,6 @@ namespace OpenSim.Region.Environment.Modules.Agent.Capabilities | |||
114 | { | 115 | { |
115 | m_capsHandlers[agentId].DeregisterHandlers(); | 116 | m_capsHandlers[agentId].DeregisterHandlers(); |
116 | m_scene.EventManager.TriggerOnDeregisterCaps(agentId, m_capsHandlers[agentId]); | 117 | m_scene.EventManager.TriggerOnDeregisterCaps(agentId, m_capsHandlers[agentId]); |
117 | |||
118 | m_capsHandlers.Remove(agentId); | 118 | m_capsHandlers.Remove(agentId); |
119 | } | 119 | } |
120 | else | 120 | else |
@@ -142,7 +142,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.Capabilities | |||
142 | public void NewUserConnection(AgentCircuitData agent) | 142 | public void NewUserConnection(AgentCircuitData agent) |
143 | { | 143 | { |
144 | capsPaths[agent.AgentID] = agent.CapsPath; | 144 | capsPaths[agent.AgentID] = agent.CapsPath; |
145 | childrenSeeds[agent.AgentID] = ((agent.ChildrenCapSeeds == null) ? new Dictionary<ulong, string>() : agent.ChildrenCapSeeds); | 145 | childrenSeeds[agent.AgentID] |
146 | = ((agent.ChildrenCapSeeds == null) ? new Dictionary<ulong, string>() : agent.ChildrenCapSeeds); | ||
146 | } | 147 | } |
147 | 148 | ||
148 | public string GetCapsPath(UUID agentId) | 149 | public string GetCapsPath(UUID agentId) |
diff --git a/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs index 76d1cba..5e3e03f 100644 --- a/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/Hypergrid/HGSceneCommunicationService.cs | |||
@@ -149,11 +149,11 @@ namespace OpenSim.Region.Environment.Scenes.Hypergrid | |||
149 | 149 | ||
150 | if (destRegionUp) | 150 | if (destRegionUp) |
151 | { | 151 | { |
152 | |||
153 | // Fixing a bug where teleporting while sitting results in the avatar ending up removed from | 152 | // Fixing a bug where teleporting while sitting results in the avatar ending up removed from |
154 | // both regions | 153 | // both regions |
155 | if (avatar.ParentID != (uint)0) | 154 | if (avatar.ParentID != (uint)0) |
156 | avatar.StandUp(); | 155 | avatar.StandUp(); |
156 | |||
157 | if (!avatar.ValidateAttachments()) | 157 | if (!avatar.ValidateAttachments()) |
158 | { | 158 | { |
159 | avatar.ControllingClient.SendTeleportFailed("Inconsistent attachment state"); | 159 | avatar.ControllingClient.SendTeleportFailed("Inconsistent attachment state"); |