diff options
author | Charles Krinke | 2009-02-22 20:52:55 +0000 |
---|---|---|
committer | Charles Krinke | 2009-02-22 20:52:55 +0000 |
commit | 8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49 (patch) | |
tree | 96a24a49de82056060dd9b7bab0cb209d5f1a129 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |
parent | Allow delivery of object messages gridwide (diff) | |
download | opensim-SC_OLD-8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49.zip opensim-SC_OLD-8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49.tar.gz opensim-SC_OLD-8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49.tar.bz2 opensim-SC_OLD-8f55b9d735fbc975ce7a4b54e972c17ffbfb1f49.tar.xz |
Mantis#3218. Thank you kindly, TLaukkan (Tommil) for a patch that:
* Added log4net dependency to physxplugin in prebuild.xml.
* Added missing m_log fields to classes.
* Replaced Console.WriteLine with appropriate m_log.Xxxx
* Tested that nant test target runs succesfully.
* Tested that local opensim sandbox starts up without errors.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 5455b53..bc113db 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -58,6 +58,7 @@ using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list; | |||
58 | using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; | 58 | using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion; |
59 | using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; | 59 | using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString; |
60 | using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3; | 60 | using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3; |
61 | using System.Reflection; | ||
61 | 62 | ||
62 | namespace OpenSim.Region.ScriptEngine.Shared.Api | 63 | namespace OpenSim.Region.ScriptEngine.Shared.Api |
63 | { | 64 | { |
@@ -66,6 +67,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
66 | /// </summary> | 67 | /// </summary> |
67 | public class LSL_Api : MarshalByRefObject, ILSL_Api, IScriptApi | 68 | public class LSL_Api : MarshalByRefObject, ILSL_Api, IScriptApi |
68 | { | 69 | { |
70 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
69 | protected IScriptEngine m_ScriptEngine; | 71 | protected IScriptEngine m_ScriptEngine; |
70 | protected SceneObjectPart m_host; | 72 | protected SceneObjectPart m_host; |
71 | protected uint m_localID; | 73 | protected uint m_localID; |
@@ -1135,7 +1137,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1135 | public LSL_Integer llGetStatus(int status) | 1137 | public LSL_Integer llGetStatus(int status) |
1136 | { | 1138 | { |
1137 | m_host.AddScriptLPS(1); | 1139 | m_host.AddScriptLPS(1); |
1138 | // Console.WriteLine(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString()); | 1140 | // m_log.Debug(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString()); |
1139 | switch (status) | 1141 | switch (status) |
1140 | { | 1142 | { |
1141 | case ScriptBaseClass.STATUS_PHYSICS: | 1143 | case ScriptBaseClass.STATUS_PHYSICS: |
@@ -2706,8 +2708,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2706 | msg.fromAgentID = new Guid(m_host.UUID.ToString()); // fromAgentID.Guid; | 2708 | msg.fromAgentID = new Guid(m_host.UUID.ToString()); // fromAgentID.Guid; |
2707 | msg.toAgentID = new Guid(user); // toAgentID.Guid; | 2709 | msg.toAgentID = new Guid(user); // toAgentID.Guid; |
2708 | msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here | 2710 | msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here |
2709 | // Console.WriteLine("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message); | 2711 | // m_log.Debug("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message); |
2710 | // Console.WriteLine("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString()); | 2712 | // m_log.Debug("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString()); |
2711 | msg.timestamp = (uint)Util.UnixTimeSinceEpoch();// timestamp; | 2713 | msg.timestamp = (uint)Util.UnixTimeSinceEpoch();// timestamp; |
2712 | //if (client != null) | 2714 | //if (client != null) |
2713 | //{ | 2715 | //{ |
@@ -7882,7 +7884,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7882 | } | 7884 | } |
7883 | catch(Exception e) | 7885 | catch(Exception e) |
7884 | { | 7886 | { |
7885 | Console.WriteLine("[LSL_API]: llRequestSimulatorData" + e.ToString()); | 7887 | m_log.Error("[LSL_API]: llRequestSimulatorData" + e.ToString()); |
7886 | return UUID.Zero.ToString(); | 7888 | return UUID.Zero.ToString(); |
7887 | } | 7889 | } |
7888 | } | 7890 | } |
@@ -9068,7 +9070,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9068 | System.Text.ASCIIEncoding enc = | 9070 | System.Text.ASCIIEncoding enc = |
9069 | new System.Text.ASCIIEncoding(); | 9071 | new System.Text.ASCIIEncoding(); |
9070 | string data = enc.GetString(a.Data); | 9072 | string data = enc.GetString(a.Data); |
9071 | //Console.WriteLine(data); | 9073 | //m_log.Debug(data); |
9072 | NotecardCache.Cache(id, data); | 9074 | NotecardCache.Cache(id, data); |
9073 | AsyncCommands. | 9075 | AsyncCommands. |
9074 | DataserverPlugin.DataserverReply(id.ToString(), | 9076 | DataserverPlugin.DataserverReply(id.ToString(), |
@@ -9114,7 +9116,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9114 | System.Text.ASCIIEncoding enc = | 9116 | System.Text.ASCIIEncoding enc = |
9115 | new System.Text.ASCIIEncoding(); | 9117 | new System.Text.ASCIIEncoding(); |
9116 | string data = enc.GetString(a.Data); | 9118 | string data = enc.GetString(a.Data); |
9117 | //Console.WriteLine(data); | 9119 | //m_log.Debug(data); |
9118 | NotecardCache.Cache(id, data); | 9120 | NotecardCache.Cache(id, data); |
9119 | AsyncCommands. | 9121 | AsyncCommands. |
9120 | DataserverPlugin.DataserverReply(id.ToString(), | 9122 | DataserverPlugin.DataserverReply(id.ToString(), |