aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2011-10-25 03:06:18 +0100
committerMelanie2011-10-25 03:06:18 +0100
commit1ec82bb000db9ca76969638504030d6ec69f51e3 (patch)
treea7070c778ba8071eb98be34b7dd38536143e4b0e /OpenSim
parentMerge commit 'ecad9f9fd589f90d1c7a20faf14af0304804b616' into bigmerge (diff)
parentadd current script status to "scripts show" command (running, suspended, etc.) (diff)
downloadopensim-SC_OLD-1ec82bb000db9ca76969638504030d6ec69f51e3.zip
opensim-SC_OLD-1ec82bb000db9ca76969638504030d6ec69f51e3.tar.gz
opensim-SC_OLD-1ec82bb000db9ca76969638504030d6ec69f51e3.tar.bz2
opensim-SC_OLD-1ec82bb000db9ca76969638504030d6ec69f51e3.tar.xz
Merge commit '116fbe8258e336be3f6ac1e11119214629799faa' into bigmerge
Conflicts: OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs7
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs9
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs22
3 files changed, 31 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
index 0cc0fe7..d3200d5 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
@@ -59,10 +59,15 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
59 public interface IScriptInstance 59 public interface IScriptInstance
60 { 60 {
61 /// <summary> 61 /// <summary>
62 /// Is this script currently running? 62 /// Is the script currently running?
63 /// </summary> 63 /// </summary>
64 bool Running { get; set; } 64 bool Running { get; set; }
65 65
66 /// <summary>
67 /// Is the script suspended?
68 /// </summary>
69 bool Suspended { get; set; }
70
66 bool ShuttingDown { get; set; } 71 bool ShuttingDown { get; set; }
67 string State { get; set; } 72 string State { get; set; }
68 IScriptEngine Engine { get; } 73 IScriptEngine Engine { get; }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 5a50714..ab46491 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -96,7 +96,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
96 private bool m_startedFromSavedState; 96 private bool m_startedFromSavedState;
97 private UUID m_CurrentStateHash; 97 private UUID m_CurrentStateHash;
98 private UUID m_RegionID; 98 private UUID m_RegionID;
99 private bool m_Suspended = false;
100 99
101 private Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>> 100 private Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>>
102 m_LineMap; 101 m_LineMap;
@@ -140,6 +139,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
140 set { m_RunEvents = value; } 139 set { m_RunEvents = value; }
141 } 140 }
142 141
142 public bool Suspended { get; set; }
143
143 public bool ShuttingDown 144 public bool ShuttingDown
144 { 145 {
145 get { return m_ShuttingDown; } 146 get { return m_ShuttingDown; }
@@ -651,7 +652,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
651 652
652 lock (m_EventQueue) 653 lock (m_EventQueue)
653 { 654 {
654 if (m_Suspended) 655 if (Suspended)
655 return 0; 656 return 0;
656 657
657 lock (m_Script) 658 lock (m_Script)
@@ -1030,12 +1031,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
1030 1031
1031 public void Suspend() 1032 public void Suspend()
1032 { 1033 {
1033 m_Suspended = true; 1034 Suspended = true;
1034 } 1035 }
1035 1036
1036 public void Resume() 1037 public void Resume()
1037 { 1038 {
1038 m_Suspended = false; 1039 Suspended = false;
1039 } 1040 }
1040 } 1041 }
1041} 1042}
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 572ca07..d606b37 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -354,11 +354,29 @@ namespace OpenSim.Region.ScriptEngine.XEngine
354 foreach (IScriptInstance instance in m_Scripts.Values) 354 foreach (IScriptInstance instance in m_Scripts.Values)
355 { 355 {
356 SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID); 356 SceneObjectPart sop = m_Scene.GetSceneObjectPart(instance.ObjectID);
357 string status;
358
359 if (instance.ShuttingDown)
360 {
361 status = "shutting down";
362 }
363 else if (instance.Suspended)
364 {
365 status = "suspended";
366 }
367 else if (!instance.Running)
368 {
369 status = "stopped";
370 }
371 else
372 {
373 status = "running";
374 }
357 375
358 MainConsole.Instance.OutputFormat( 376 MainConsole.Instance.OutputFormat(
359 "{0}.{1}, script UUID {2}, prim UUID {3} @ {4}", 377 "{0}.{1}, script UUID {2}, prim UUID {3} @ {4} ({5})",
360 instance.PrimName, instance.ScriptName, instance.AssetID, instance.ObjectID, 378 instance.PrimName, instance.ScriptName, instance.AssetID, instance.ObjectID,
361 sop.AbsolutePosition, m_Scene.RegionInfo.RegionName); 379 sop.AbsolutePosition, status);
362 } 380 }
363 } 381 }
364 } 382 }