From fb26d32a5c1320e97c9288326ebe402658a0a1c7 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 4 Dec 2012 22:33:25 +0000
Subject: minor: Put Scene.PhysicsRequestAsset() into standard C# xml format.
---
OpenSim/Region/Framework/Scenes/Scene.cs | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 1ad5edd..cca295c 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -5638,10 +5638,17 @@ namespace OpenSim.Region.Framework.Scenes
return m_SpawnPoint - 1;
}
- // Wrappers to get physics modules retrieve assets. Has to be done this way
- // because we can't assign the asset service to physics directly - at the
- // time physics are instantiated it's not registered but it will be by
- // the time the first prim exists.
+ ///
+ /// Wrappers to get physics modules retrieve assets.
+ ///
+ ///
+ /// Has to be done this way
+ /// because we can't assign the asset service to physics directly - at the
+ /// time physics are instantiated it's not registered but it will be by
+ /// the time the first prim exists.
+ ///
+ ///
+ ///
public void PhysicsRequestAsset(UUID assetID, AssetReceivedDelegate callback)
{
AssetService.Get(assetID.ToString(), callback, PhysicsAssetReceived);
--
cgit v1.1
From 0d4047e641bac2d7fa554097ad23cec930082e33 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 4 Dec 2012 23:06:02 +0000
Subject: minor: Comment out "Delivering IM to..." messages for now.
---
.../CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
index 3983369..a169748 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
@@ -146,7 +146,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
if (sp != null && !sp.IsChildAgent)
{
// Local message
- m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to root agent {0} {1}", sp.Name, toAgentID);
+// m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to root agent {0} {1}", sp.Name, toAgentID);
sp.ControllingClient.SendInstantMessage(im);
@@ -166,7 +166,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
if (sp != null)
{
// Local message
- m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to child agent {0} {1}", sp.Name, toAgentID);
+// m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to child agent {0} {1}", sp.Name, toAgentID);
sp.ControllingClient.SendInstantMessage(im);
@@ -176,7 +176,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
}
}
- m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to {0} via XMLRPC", im.toAgentID);
+// m_log.DebugFormat("[INSTANT MESSAGE]: Delivering IM to {0} via XMLRPC", im.toAgentID);
SendGridInstantMessageViaXMLRPC(im, result);
}
--
cgit v1.1
From 1b5f21f761ae12be34d80a41d23c5b97cc10f4a9 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Tue, 4 Dec 2012 23:07:26 +0000
Subject: minor: also comment out the debug log message which reports searching
for child agents in simulator scenes for now.
---
.../Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
index a169748..fa935cd 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
@@ -159,8 +159,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
// try child avatar second
foreach (Scene scene in m_Scenes)
{
- m_log.DebugFormat(
- "[INSTANT MESSAGE]: Looking for child of {0} in {1}", toAgentID, scene.RegionInfo.RegionName);
+// m_log.DebugFormat(
+// "[INSTANT MESSAGE]: Looking for child of {0} in {1}", toAgentID, scene.RegionInfo.RegionName);
ScenePresence sp = scene.GetScenePresence(toAgentID);
if (sp != null)
--
cgit v1.1
From d97440c7cf307ec701cc5351a0075239ece44727 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 5 Dec 2012 21:37:41 +0000
Subject: On XEngine.ProcessEventHandler(), instead of creating a new
CultureInfo on every call use the single one set by
Culture.SetCurrentCulture()
This is slightly different in that SetCurrentCulture() does not use overridden settings if the system culture matches en-US but some settings there have been changed.
This is what we want - we do not want to use any system overriden settings.
---
OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 0460f22..1dab51e 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -1415,8 +1415,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
///
private object ProcessEventHandler(object parms)
{
- CultureInfo USCulture = new CultureInfo("en-US");
- Thread.CurrentThread.CurrentCulture = USCulture;
+ Culture.SetCurrentCulture();
IScriptInstance instance = (ScriptInstance) parms;
--
cgit v1.1
From ea786414c283ed04a32905b177afd342c88a7471 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 5 Dec 2012 21:51:08 +0000
Subject: In XEngine.DoOnRezScript() use Culture.SetCurrentCulture() instead of
constructing a new CultureInfo separately
---
OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 1dab51e..d9d4494 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -1018,8 +1018,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
string assembly = "";
- CultureInfo USCulture = new CultureInfo("en-US");
- Thread.CurrentThread.CurrentCulture = USCulture;
+ Culture.SetCurrentCulture();
Dictionary, KeyValuePair> linemap;
--
cgit v1.1
From fdf8876e20e519e2c69f0bd0fed4aea7ff4bab8d Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 5 Dec 2012 21:52:10 +0000
Subject: In BaseHttpServer.HandleRequest(), use Culture.SetCurrentCulture()
rather than creating a new CultureInfo separately
---
OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 2cd626f..8a0340f 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -436,7 +436,7 @@ namespace OpenSim.Framework.Servers.HttpServer
// reqnum = String.Format("{0}:{1}",request.RemoteIPEndPoint,request.Headers["opensim-request-id"]);
//m_log.DebugFormat("[BASE HTTP SERVER]: <{0}> handle request for {1}",reqnum,request.RawUrl);
- Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true);
+ Culture.SetCurrentCulture();
// // This is the REST agent interface. We require an agent to properly identify
// // itself. If the REST handler recognizes the prefix it will attempt to
--
cgit v1.1
From 2342d20a7e249bc3006e47e85e03de6d532a7d2d Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 5 Dec 2012 21:53:25 +0000
Subject: minor: tidy up spacing at bottom of MundaneFrameworkTests
---
OpenSim/Framework/Tests/MundaneFrameworkTests.cs | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/Tests/MundaneFrameworkTests.cs b/OpenSim/Framework/Tests/MundaneFrameworkTests.cs
index 47fe599..1dc8053 100644
--- a/OpenSim/Framework/Tests/MundaneFrameworkTests.cs
+++ b/OpenSim/Framework/Tests/MundaneFrameworkTests.cs
@@ -303,10 +303,6 @@ namespace OpenSim.Framework.Tests
Culture.SetCurrentCulture();
Assert.That(Thread.CurrentThread.CurrentCulture.Name == ci.Name, "SetCurrentCulture failed to set thread culture to en-US");
- }
-
-
-
+ }
}
-}
-
+}
\ No newline at end of file
--
cgit v1.1
From b60c6bc3f8936f3a152e0609daa1081216d34768 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 5 Dec 2012 22:01:47 +0000
Subject: Don't pointlessly set ExtraParams = byte[1] in PrimitiveBaseShape
since this is ignored by the ExtraParams properly anyway
---
OpenSim/Framework/PrimitiveBaseShape.cs | 3 ---
1 file changed, 3 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs
index 76dcfca..3dbdd0f 100644
--- a/OpenSim/Framework/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/PrimitiveBaseShape.cs
@@ -193,7 +193,6 @@ namespace OpenSim.Framework
public PrimitiveBaseShape()
{
PCode = (byte) PCodeEnum.Primitive;
- ExtraParams = new byte[1];
m_textureEntry = DEFAULT_TEXTURE;
}
@@ -203,7 +202,6 @@ namespace OpenSim.Framework
return;
PCode = (byte)PCodeEnum.Primitive;
- ExtraParams = new byte[1];
m_textureEntry = DEFAULT_TEXTURE;
}
@@ -216,7 +214,6 @@ namespace OpenSim.Framework
// m_log.DebugFormat("[PRIMITIVE BASE SHAPE]: Creating from {0}", prim.ID);
PCode = (byte)prim.PrimData.PCode;
- ExtraParams = new byte[1];
State = prim.PrimData.State;
PathBegin = Primitive.PackBeginCut(prim.PrimData.PathBegin);
--
cgit v1.1
From 0f3ebe09713cf67110ff24bf6cd10b9add5cc8c9 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 5 Dec 2012 22:12:45 +0000
Subject: Remove very probably unused PrimitiveBaseShape(bool) constructor to
reduce code complexity
---
OpenSim/Framework/PrimitiveBaseShape.cs | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs
index 3dbdd0f..4c36819 100644
--- a/OpenSim/Framework/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/PrimitiveBaseShape.cs
@@ -192,15 +192,6 @@ namespace OpenSim.Framework
public PrimitiveBaseShape()
{
- PCode = (byte) PCodeEnum.Primitive;
- m_textureEntry = DEFAULT_TEXTURE;
- }
-
- public PrimitiveBaseShape(bool noShape)
- {
- if (noShape)
- return;
-
PCode = (byte)PCodeEnum.Primitive;
m_textureEntry = DEFAULT_TEXTURE;
}
@@ -245,7 +236,10 @@ namespace OpenSim.Framework
SculptTexture = prim.Sculpt.SculptTexture;
SculptType = (byte)prim.Sculpt.Type;
}
- else SculptType = (byte)OpenMetaverse.SculptType.None;
+ else
+ {
+ SculptType = (byte)OpenMetaverse.SculptType.None;
+ }
}
[XmlIgnore]
@@ -337,9 +331,9 @@ namespace OpenSim.Framework
_scale = new Vector3(side, side, side);
}
- public void SetHeigth(float heigth)
+ public void SetHeigth(float height)
{
- _scale.Z = heigth;
+ _scale.Z = height;
}
public void SetRadius(float radius)
--
cgit v1.1
From e8df0f1b4c3194c7f5c1a354b5d5d2f67d6a250c Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 5 Dec 2012 22:33:28 +0000
Subject: Add IScriptInstance.EventsProcessed stat so that we can record this
information and display in "show scripts" for debug purposes
---
OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs | 5 +++++
OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 4 ++++
OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 1 +
3 files changed, 10 insertions(+)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
index b04f6b6..f3abd96 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
@@ -114,6 +114,11 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
UUID AssetID { get; }
Queue EventQueue { get; }
+ ///
+ /// Number of events processed by this script instance.
+ ///
+ long EventsProcessed { get; }
+
void ClearQueue();
int StartParam { get; set; }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 5793cc9..5bfe97a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -173,6 +173,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
public Queue EventQueue { get; private set; }
+ public long EventsProcessed { get; private set; }
+
public int StartParam { get; set; }
public TaskInventoryItem ScriptTask { get; private set; }
@@ -808,6 +810,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
// script engine to run the next event.
lock (EventQueue)
{
+ EventsProcessed++;
+
if (EventQueue.Count > 0 && Running && !ShuttingDown)
{
m_CurrentWorkItem = Engine.QueueEventHandler(this);
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index d9d4494..2136fe8 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -512,6 +512,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
lock (eq)
sb.AppendFormat("Queued events : {0}\n", eq.Count);
+ sb.AppendFormat("Processed events : {0}\n", instance.EventsProcessed);
sb.AppendFormat("Item UUID : {0}\n", instance.ItemID);
sb.AppendFormat("Containing part name: {0}\n", instance.PrimName);
sb.AppendFormat("Containing part UUID: {0}\n", instance.ObjectID);
--
cgit v1.1
From 652f4bcb425646aab2096da99aa00016dfe639fd Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 5 Dec 2012 23:27:50 +0000
Subject: For now, sort "show scripts" output in descending order sorted by
events processed.
For debug purposes - should later add options to allow different sorting or show only highest 10, etc.
---
OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 2136fe8..394826e 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -30,6 +30,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
+using System.Linq;
using System.Reflection;
using System.Security;
using System.Security.Policy;
@@ -377,9 +378,21 @@ namespace OpenSim.Region.ScriptEngine.XEngine
///
///
///
- /// true if we're okay to proceed, false if not.
+ /// Basis on which to sort output. Can be null if no sort needs to take place
private void HandleScriptsAction(string[] cmdparams, Action action)
{
+ HandleScriptsAction