aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs40
1 files changed, 29 insertions, 11 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 6ed08f3..6367fcf 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2388,7 +2388,7 @@ namespace OpenSim.Region.Framework.Scenes
2388 } 2388 }
2389 catch (Exception e) 2389 catch (Exception e)
2390 { 2390 {
2391 m_log.WarnFormat("[SCENE]: Problem casting object: {0}", e.Message); 2391 m_log.WarnFormat("[SCENE]: Problem casting object: " + e.ToString());
2392 return false; 2392 return false;
2393 } 2393 }
2394 2394
@@ -3271,7 +3271,6 @@ namespace OpenSim.Region.Framework.Scenes
3271 m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", m_regInfo.RegionName); 3271 m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", m_regInfo.RegionName);
3272 } 3272 }
3273 3273
3274
3275 /// <summary> 3274 /// <summary>
3276 /// Do the work necessary to initiate a new user connection for a particular scene. 3275 /// Do the work necessary to initiate a new user connection for a particular scene.
3277 /// At the moment, this consists of setting up the caps infrastructure 3276 /// At the moment, this consists of setting up the caps infrastructure
@@ -3284,6 +3283,23 @@ namespace OpenSim.Region.Framework.Scenes
3284 /// also return a reason.</returns> 3283 /// also return a reason.</returns>
3285 public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason) 3284 public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason)
3286 { 3285 {
3286 return NewUserConnection(agent, teleportFlags, out reason, true);
3287 }
3288
3289 /// <summary>
3290 /// Do the work necessary to initiate a new user connection for a particular scene.
3291 /// At the moment, this consists of setting up the caps infrastructure
3292 /// The return bool should allow for connections to be refused, but as not all calling paths
3293 /// take proper notice of it let, we allowed banned users in still.
3294 /// </summary>
3295 /// <param name="agent">CircuitData of the agent who is connecting</param>
3296 /// <param name="reason">Outputs the reason for the false response on this string</param>
3297 /// <param name="requirePresenceLookup">True for normal presence. False for NPC
3298 /// or other applications where a full grid/Hypergrid presence may not be required.</param>
3299 /// <returns>True if the region accepts this agent. False if it does not. False will
3300 /// also return a reason.</returns>
3301 public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason, bool requirePresenceLookup)
3302 {
3287 bool vialogin = ((teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0 || 3303 bool vialogin = ((teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0 ||
3288 (teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0); 3304 (teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0);
3289 reason = String.Empty; 3305 reason = String.Empty;
@@ -3332,16 +3348,18 @@ namespace OpenSim.Region.Framework.Scenes
3332 3348
3333 if (sp == null) // We don't have an [child] agent here already 3349 if (sp == null) // We don't have an [child] agent here already
3334 { 3350 {
3335 3351 if (requirePresenceLookup)
3336 try
3337 { 3352 {
3338 if (!VerifyUserPresence(agent, out reason)) 3353 try
3354 {
3355 if (!VerifyUserPresence(agent, out reason))
3356 return false;
3357 }
3358 catch (Exception e)
3359 {
3360 m_log.ErrorFormat("[CONNECTION BEGIN]: Exception verifying presence " + e.ToString());
3339 return false; 3361 return false;
3340 } 3362 }
3341 catch (Exception e)
3342 {
3343 m_log.DebugFormat("[CONNECTION BEGIN]: Exception verifying presence {0}", e.Message);
3344 return false;
3345 } 3363 }
3346 3364
3347 try 3365 try
@@ -3351,7 +3369,7 @@ namespace OpenSim.Region.Framework.Scenes
3351 } 3369 }
3352 catch (Exception e) 3370 catch (Exception e)
3353 { 3371 {
3354 m_log.DebugFormat("[CONNECTION BEGIN]: Exception authorizing user {0}", e.Message); 3372 m_log.ErrorFormat("[CONNECTION BEGIN]: Exception authorizing user " + e.ToString());
3355 return false; 3373 return false;
3356 } 3374 }
3357 3375