aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDiva Canto2013-06-22 08:29:06 -0700
committerDiva Canto2013-06-22 08:29:06 -0700
commit6c7e33fe472014688837b993118fc48878f134ff (patch)
tree0ca3e00d18685d6064ceda47d3e583fd706fe69b /OpenSim
parentHG: avoid call on localhost between sim and UAS for standalone. (diff)
downloadopensim-SC-6c7e33fe472014688837b993118fc48878f134ff.zip
opensim-SC-6c7e33fe472014688837b993118fc48878f134ff.tar.gz
opensim-SC-6c7e33fe472014688837b993118fc48878f134ff.tar.bz2
opensim-SC-6c7e33fe472014688837b993118fc48878f134ff.tar.xz
Change IsLocalRegion from using region handle to using regionID. This was affecting UpdateAgent and CloseAgent in cases where the foreign region is on the same coordinates as *some* local region.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs10
-rw-r--r--OpenSim/Server/Handlers/Simulation/AgentHandlers.cs1
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs2
3 files changed, 6 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
index b2a1b23..d120e11 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs
@@ -194,7 +194,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
194 return false; 194 return false;
195 195
196 // Try local first 196 // Try local first
197 if (m_localBackend.IsLocalRegion(destination.RegionHandle)) 197 if (m_localBackend.IsLocalRegion(destination.RegionID))
198 return m_localBackend.UpdateAgent(destination, cAgentData); 198 return m_localBackend.UpdateAgent(destination, cAgentData);
199 199
200 return m_remoteConnector.UpdateAgent(destination, cAgentData); 200 return m_remoteConnector.UpdateAgent(destination, cAgentData);
@@ -206,7 +206,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
206 return false; 206 return false;
207 207
208 // Try local first 208 // Try local first
209 if (m_localBackend.IsLocalRegion(destination.RegionHandle)) 209 if (m_localBackend.IsLocalRegion(destination.RegionID))
210 return m_localBackend.UpdateAgent(destination, cAgentData); 210 return m_localBackend.UpdateAgent(destination, cAgentData);
211 211
212 return m_remoteConnector.UpdateAgent(destination, cAgentData); 212 return m_remoteConnector.UpdateAgent(destination, cAgentData);
@@ -224,7 +224,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
224 return true; 224 return true;
225 225
226 // else do the remote thing 226 // else do the remote thing
227 if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) 227 if (!m_localBackend.IsLocalRegion(destination.RegionID))
228 return m_remoteConnector.RetrieveAgent(destination, id, out agent); 228 return m_remoteConnector.RetrieveAgent(destination, id, out agent);
229 229
230 return false; 230 return false;
@@ -273,7 +273,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
273 return true; 273 return true;
274 274
275 // else do the remote thing 275 // else do the remote thing
276 if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) 276 if (!m_localBackend.IsLocalRegion(destination.RegionID))
277 return m_remoteConnector.CloseAgent(destination, id); 277 return m_remoteConnector.CloseAgent(destination, id);
278 278
279 return false; 279 return false;
@@ -296,7 +296,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation
296 } 296 }
297 297
298 // else do the remote thing 298 // else do the remote thing
299 if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) 299 if (!m_localBackend.IsLocalRegion(destination.RegionID))
300 return m_remoteConnector.CreateObject(destination, newPosition, sog, isLocalCall); 300 return m_remoteConnector.CreateObject(destination, newPosition, sog, isLocalCall);
301 301
302 return false; 302 return false;
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
index 334d313..71a9e6f 100644
--- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
@@ -576,7 +576,6 @@ namespace OpenSim.Server.Handlers.Simulation
576 //agent.Dump(); 576 //agent.Dump();
577 // This is one of the meanings of PUT agent 577 // This is one of the meanings of PUT agent
578 result = UpdateAgent(destination, agent); 578 result = UpdateAgent(destination, agent);
579
580 } 579 }
581 else if ("AgentPosition".Equals(messageType)) 580 else if ("AgentPosition".Equals(messageType))
582 { 581 {
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index e247008..f51c809 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -241,7 +241,7 @@ namespace OpenSim.Services.Connectors.Simulation
241 /// </summary> 241 /// </summary>
242 private bool UpdateAgent(GridRegion destination, IAgentData cAgentData, int timeout) 242 private bool UpdateAgent(GridRegion destination, IAgentData cAgentData, int timeout)
243 { 243 {
244 // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: UpdateAgent start"); 244 // m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: UpdateAgent in {0}", destination.ServerURI);
245 245
246 // Eventually, we want to use a caps url instead of the agentID 246 // Eventually, we want to use a caps url instead of the agentID
247 string uri = destination.ServerURI + AgentPath() + cAgentData.AgentID + "/"; 247 string uri = destination.ServerURI + AgentPath() + cAgentData.AgentID + "/";