diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 42 |
1 files changed, 29 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index c69c9b1..6367fcf 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -593,8 +593,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
593 | StatsReporter.OnSendStatsResult += SendSimStatsPackets; | 593 | StatsReporter.OnSendStatsResult += SendSimStatsPackets; |
594 | StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; | 594 | StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; |
595 | 595 | ||
596 | StatsReporter.SetObjectCapacity(RegionInfo.ObjectCapacity); | ||
597 | |||
598 | // Old | 596 | // Old |
599 | /* | 597 | /* |
600 | m_simulatorVersion = simulatorVersion | 598 | m_simulatorVersion = simulatorVersion |
@@ -2390,7 +2388,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2390 | } | 2388 | } |
2391 | catch (Exception e) | 2389 | catch (Exception e) |
2392 | { | 2390 | { |
2393 | m_log.WarnFormat("[SCENE]: Problem casting object: {0}", e.Message); | 2391 | m_log.WarnFormat("[SCENE]: Problem casting object: " + e.ToString()); |
2394 | return false; | 2392 | return false; |
2395 | } | 2393 | } |
2396 | 2394 | ||
@@ -3273,7 +3271,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
3273 | 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); |
3274 | } | 3272 | } |
3275 | 3273 | ||
3276 | |||
3277 | /// <summary> | 3274 | /// <summary> |
3278 | /// 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. |
3279 | /// At the moment, this consists of setting up the caps infrastructure | 3276 | /// At the moment, this consists of setting up the caps infrastructure |
@@ -3286,6 +3283,23 @@ namespace OpenSim.Region.Framework.Scenes | |||
3286 | /// also return a reason.</returns> | 3283 | /// also return a reason.</returns> |
3287 | public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason) | 3284 | public bool NewUserConnection(AgentCircuitData agent, uint teleportFlags, out string reason) |
3288 | { | 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 | { | ||
3289 | bool vialogin = ((teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0 || | 3303 | bool vialogin = ((teleportFlags & (uint)Constants.TeleportFlags.ViaLogin) != 0 || |
3290 | (teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0); | 3304 | (teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0); |
3291 | reason = String.Empty; | 3305 | reason = String.Empty; |
@@ -3334,16 +3348,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
3334 | 3348 | ||
3335 | 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 |
3336 | { | 3350 | { |
3337 | 3351 | if (requirePresenceLookup) | |
3338 | try | ||
3339 | { | 3352 | { |
3340 | 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()); | ||
3341 | return false; | 3361 | return false; |
3342 | } | 3362 | } |
3343 | catch (Exception e) | ||
3344 | { | ||
3345 | m_log.DebugFormat("[CONNECTION BEGIN]: Exception verifying presence {0}", e.Message); | ||
3346 | return false; | ||
3347 | } | 3363 | } |
3348 | 3364 | ||
3349 | try | 3365 | try |
@@ -3353,7 +3369,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3353 | } | 3369 | } |
3354 | catch (Exception e) | 3370 | catch (Exception e) |
3355 | { | 3371 | { |
3356 | m_log.DebugFormat("[CONNECTION BEGIN]: Exception authorizing user {0}", e.Message); | 3372 | m_log.ErrorFormat("[CONNECTION BEGIN]: Exception authorizing user " + e.ToString()); |
3357 | return false; | 3373 | return false; |
3358 | } | 3374 | } |
3359 | 3375 | ||