diff options
author | idb | 2009-04-18 14:21:54 +0000 |
---|---|---|
committer | idb | 2009-04-18 14:21:54 +0000 |
commit | 21d80b28aa69d9cb23e45db9ac43278a4934db47 (patch) | |
tree | c8eca7c50316ab463776d1a9516696907b1bd481 /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | * Adds IObject.Shape to MRM (diff) | |
download | opensim-SC_OLD-21d80b28aa69d9cb23e45db9ac43278a4934db47.zip opensim-SC_OLD-21d80b28aa69d9cb23e45db9ac43278a4934db47.tar.gz opensim-SC_OLD-21d80b28aa69d9cb23e45db9ac43278a4934db47.tar.bz2 opensim-SC_OLD-21d80b28aa69d9cb23e45db9ac43278a4934db47.tar.xz |
Obtain the owner name for the X-SecondLife-Owner-Name header in llHTTPRequest when the owner is offline/not in the region.
Fixes Mantis #3454
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index cc43d08..6a5777c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -8797,7 +8797,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8797 | Vector3 position = m_host.AbsolutePosition; | 8797 | Vector3 position = m_host.AbsolutePosition; |
8798 | Vector3 velocity = m_host.Velocity; | 8798 | Vector3 velocity = m_host.Velocity; |
8799 | Quaternion rotation = m_host.RotationOffset; | 8799 | Quaternion rotation = m_host.RotationOffset; |
8800 | string ownerName = String.Empty; | ||
8800 | ScenePresence scenePresence = World.GetScenePresence(m_host.ObjectOwner); | 8801 | ScenePresence scenePresence = World.GetScenePresence(m_host.ObjectOwner); |
8802 | if (scenePresence == null) | ||
8803 | ownerName = resolveName(m_host.ObjectOwner); | ||
8804 | else | ||
8805 | ownerName = scenePresence.Name; | ||
8806 | |||
8801 | RegionInfo regionInfo = World.RegionInfo; | 8807 | RegionInfo regionInfo = World.RegionInfo; |
8802 | 8808 | ||
8803 | Dictionary<string, string> httpHeaders = new Dictionary<string, string>(); | 8809 | Dictionary<string, string> httpHeaders = new Dictionary<string, string>(); |
@@ -8819,7 +8825,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8819 | httpHeaders["X-SecondLife-Local-Position"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", position.X, position.Y, position.Z); | 8825 | httpHeaders["X-SecondLife-Local-Position"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", position.X, position.Y, position.Z); |
8820 | httpHeaders["X-SecondLife-Local-Velocity"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", velocity.X, velocity.Y, velocity.Z); | 8826 | httpHeaders["X-SecondLife-Local-Velocity"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", velocity.X, velocity.Y, velocity.Z); |
8821 | httpHeaders["X-SecondLife-Local-Rotation"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000}, {3:0.000000})", rotation.X, rotation.Y, rotation.Z, rotation.W); | 8827 | httpHeaders["X-SecondLife-Local-Rotation"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000}, {3:0.000000})", rotation.X, rotation.Y, rotation.Z, rotation.W); |
8822 | httpHeaders["X-SecondLife-Owner-Name"] = scenePresence == null ? string.Empty : scenePresence.ControllingClient.Name; | 8828 | httpHeaders["X-SecondLife-Owner-Name"] = ownerName; |
8823 | httpHeaders["X-SecondLife-Owner-Key"] = m_host.ObjectOwner.ToString(); | 8829 | httpHeaders["X-SecondLife-Owner-Key"] = m_host.ObjectOwner.ToString(); |
8824 | string userAgent = config.Configs["Network"].GetString("user_agent", null); | 8830 | string userAgent = config.Configs["Network"].GetString("user_agent", null); |
8825 | if (userAgent != null) | 8831 | if (userAgent != null) |