diff options
author | Melanie | 2011-02-16 08:06:11 +0000 |
---|---|---|
committer | Melanie | 2011-02-16 08:06:11 +0000 |
commit | 918c12c965e822457807563acd4e16638a6bd3cc (patch) | |
tree | a910e27a3da8e3a1661434224230ad7e987d1070 /OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation | |
parent | Catch HttpServer exception: mantis #5381 (diff) | |
download | opensim-SC_OLD-918c12c965e822457807563acd4e16638a6bd3cc.zip opensim-SC_OLD-918c12c965e822457807563acd4e16638a6bd3cc.tar.gz opensim-SC_OLD-918c12c965e822457807563acd4e16638a6bd3cc.tar.bz2 opensim-SC_OLD-918c12c965e822457807563acd4e16638a6bd3cc.tar.xz |
Change the QUERYACCESS method to eliminate spurious access denied messages
Diffstat (limited to 'OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation')
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index 56720b7..a298b65 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | |||
@@ -257,15 +257,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
257 | return false; | 257 | return false; |
258 | } | 258 | } |
259 | 259 | ||
260 | public bool QueryAccess(GridRegion destination, UUID id, Vector3 position) | 260 | public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string reason) |
261 | { | 261 | { |
262 | reason = "Communications failure"; | ||
262 | if (destination == null) | 263 | if (destination == null) |
263 | return false; | 264 | return false; |
264 | 265 | ||
265 | foreach (Scene s in m_sceneList) | 266 | foreach (Scene s in m_sceneList) |
266 | { | 267 | { |
267 | if (s.RegionInfo.RegionID == destination.RegionID) | 268 | if (s.RegionInfo.RegionID == destination.RegionID) |
268 | return s.QueryAccess(id, position); | 269 | return s.QueryAccess(id, position, out reason); |
269 | } | 270 | } |
270 | //m_log.Debug("[LOCAL COMMS]: region not found for QueryAccess"); | 271 | //m_log.Debug("[LOCAL COMMS]: region not found for QueryAccess"); |
271 | return false; | 272 | return false; |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs index c4919b3..0c92bd1 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/RemoteSimulationConnector.cs | |||
@@ -239,18 +239,19 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
239 | 239 | ||
240 | } | 240 | } |
241 | 241 | ||
242 | public bool QueryAccess(GridRegion destination, UUID id, Vector3 position) | 242 | public bool QueryAccess(GridRegion destination, UUID id, Vector3 position, out string reason) |
243 | { | 243 | { |
244 | reason = "Communications failure"; | ||
244 | if (destination == null) | 245 | if (destination == null) |
245 | return false; | 246 | return false; |
246 | 247 | ||
247 | // Try local first | 248 | // Try local first |
248 | if (m_localBackend.QueryAccess(destination, id, position)) | 249 | if (m_localBackend.QueryAccess(destination, id, position, out reason)) |
249 | return true; | 250 | return true; |
250 | 251 | ||
251 | // else do the remote thing | 252 | // else do the remote thing |
252 | if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) | 253 | if (!m_localBackend.IsLocalRegion(destination.RegionHandle)) |
253 | return m_remoteConnector.QueryAccess(destination, id, position); | 254 | return m_remoteConnector.QueryAccess(destination, id, position, out reason); |
254 | 255 | ||
255 | return false; | 256 | return false; |
256 | 257 | ||