diff options
author | Oren Hurvitz | 2013-12-08 16:50:24 +0200 |
---|---|---|
committer | Oren Hurvitz | 2014-03-24 12:26:52 +0100 |
commit | 921f0052f43e0e4553e970a8d560c5635fcd3ca6 (patch) | |
tree | 10bc5c8041c355adaef139d6d23f6f62e95f6bdf /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | Better error messages (diff) | |
download | opensim-SC-921f0052f43e0e4553e970a8d560c5635fcd3ca6.zip opensim-SC-921f0052f43e0e4553e970a8d560c5635fcd3ca6.tar.gz opensim-SC-921f0052f43e0e4553e970a8d560c5635fcd3ca6.tar.bz2 opensim-SC-921f0052f43e0e4553e970a8d560c5635fcd3ca6.tar.xz |
Get the full viewer name even if it's (incorrectly) sent in the 'Channel' field
Recent versions of Firestorm and Singularity have started sending the viewer name in the 'Channel' field, leaving only their version number in the 'Viewer' field. So we need to search both of these fields for the viewer name.
This resolves http://opensimulator.org/mantis/view.php?id=6952
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 08a2301..51f6c5e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3413,6 +3413,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3413 | // TeleportFlags.ViaLandmark | TeleportFlags.ViaLocation | TeleportFlags.ViaLandmark | TeleportFlags.Default - Regular Teleport | 3413 | // TeleportFlags.ViaLandmark | TeleportFlags.ViaLocation | TeleportFlags.ViaLandmark | TeleportFlags.Default - Regular Teleport |
3414 | 3414 | ||
3415 | // Don't disable this log message - it's too helpful | 3415 | // Don't disable this log message - it's too helpful |
3416 | string curViewer = Util.GetViewerName(acd); | ||
3416 | m_log.DebugFormat( | 3417 | m_log.DebugFormat( |
3417 | "[SCENE]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, IP {6}, viewer {7}, teleportflags ({8}), position {9})", | 3418 | "[SCENE]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, IP {6}, viewer {7}, teleportflags ({8}), position {9})", |
3418 | RegionInfo.RegionName, | 3419 | RegionInfo.RegionName, |
@@ -3422,7 +3423,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3422 | acd.AgentID, | 3423 | acd.AgentID, |
3423 | acd.circuitcode, | 3424 | acd.circuitcode, |
3424 | acd.IPAddress, | 3425 | acd.IPAddress, |
3425 | acd.Viewer, | 3426 | curViewer, |
3426 | ((TPFlags)teleportFlags).ToString(), | 3427 | ((TPFlags)teleportFlags).ToString(), |
3427 | acd.startpos | 3428 | acd.startpos |
3428 | ); | 3429 | ); |
@@ -3442,7 +3443,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3442 | { | 3443 | { |
3443 | foreach (string viewer in m_AllowedViewers) | 3444 | foreach (string viewer in m_AllowedViewers) |
3444 | { | 3445 | { |
3445 | if (viewer == acd.Viewer.Substring(0, viewer.Length).Trim().ToLower()) | 3446 | if (viewer == curViewer.Substring(0, viewer.Length).Trim().ToLower()) |
3446 | { | 3447 | { |
3447 | ViewerDenied = false; | 3448 | ViewerDenied = false; |
3448 | break; | 3449 | break; |
@@ -3459,7 +3460,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3459 | { | 3460 | { |
3460 | foreach (string viewer in m_BannedViewers) | 3461 | foreach (string viewer in m_BannedViewers) |
3461 | { | 3462 | { |
3462 | if (viewer == acd.Viewer.Substring(0, viewer.Length).Trim().ToLower()) | 3463 | if (viewer == curViewer.Substring(0, viewer.Length).Trim().ToLower()) |
3463 | { | 3464 | { |
3464 | ViewerDenied = true; | 3465 | ViewerDenied = true; |
3465 | break; | 3466 | break; |
@@ -3471,7 +3472,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3471 | { | 3472 | { |
3472 | m_log.DebugFormat( | 3473 | m_log.DebugFormat( |
3473 | "[SCENE]: Access denied for {0} {1} using {2}", | 3474 | "[SCENE]: Access denied for {0} {1} using {2}", |
3474 | acd.firstname, acd.lastname, acd.Viewer); | 3475 | acd.firstname, acd.lastname, curViewer); |
3475 | reason = "Access denied, your viewer is banned by the region owner"; | 3476 | reason = "Access denied, your viewer is banned by the region owner"; |
3476 | return false; | 3477 | return false; |
3477 | } | 3478 | } |