From 4ec4e16c809cf86a63b736d2b7b6ad7291595a5f Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Wed, 4 Jun 2008 09:59:27 +0000 Subject: Formatting cleanup, minor refactoring, svn properties. --- .../XEngine/AsyncCommandPlugins/Dataserver.cs | 20 ++++++++++---------- .../XEngine/AsyncCommandPlugins/Eventstream.cs | 7 +++---- .../XEngine/AsyncCommandPlugins/HttpRequest.cs | 2 +- .../XEngine/AsyncCommandPlugins/SensorRepeat.cs | 20 ++++++++++---------- .../XEngine/AsyncCommandPlugins/Timer.cs | 8 ++++---- .../XEngine/AsyncCommandPlugins/XmlRequest.cs | 12 ++++++------ 6 files changed, 34 insertions(+), 35 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins') diff --git a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Dataserver.cs b/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Dataserver.cs index 794a015..47ab420 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Dataserver.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Dataserver.cs @@ -57,11 +57,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins } public LLUUID RegisterRequest(uint localID, LLUUID itemID, - string identifier) + string identifier) { - lock(DataserverRequests) + lock (DataserverRequests) { - if(DataserverRequests.ContainsKey(identifier)) + if (DataserverRequests.ContainsKey(identifier)) return LLUUID.Zero; DataserverRequest ds = new DataserverRequest(); @@ -84,9 +84,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins { DataserverRequest ds; - lock(DataserverRequests) + lock (DataserverRequests) { - if(!DataserverRequests.ContainsKey(identifier)) + if (!DataserverRequests.ContainsKey(identifier)) return; ds=DataserverRequests[identifier]; @@ -94,7 +94,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins } m_CmdManager.m_ScriptEngine.PostObjectEvent(ds.localID, - new XEventParams( "dataserver", new Object[] + new XEventParams("dataserver", new Object[] { new LSL_Types.LSLString(ds.ID.ToString()), new LSL_Types.LSLString(reply)}, new XDetectParams[0])); @@ -102,11 +102,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins public void RemoveEvents(uint localID, LLUUID itemID) { - lock(DataserverRequests) + lock (DataserverRequests) { foreach (DataserverRequest ds in new List(DataserverRequests.Values)) { - if(ds.itemID == itemID) + if (ds.itemID == itemID) DataserverRequests.Remove(ds.handle); } } @@ -114,11 +114,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins public void ExpireRequests() { - lock(DataserverRequests) + lock (DataserverRequests) { foreach (DataserverRequest ds in new List(DataserverRequests.Values)) { - if(ds.startTime > DateTime.Now.AddSeconds(30)) + if (ds.startTime > DateTime.Now.AddSeconds(30)) DataserverRequests.Remove(ds.handle); } } diff --git a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Eventstream.cs b/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Eventstream.cs index 9112b9c..dab7a0a 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Eventstream.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Eventstream.cs @@ -55,14 +55,13 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins public void AddObjectEvent(uint localID, string eventName, XDetectParams det) { SceneObjectPart part = m_CmdManager.m_ScriptEngine.World. - GetSceneObjectPart(localID); + GetSceneObjectPart(localID); - if(part == null) // Can't register events for non-prims + if (part == null) // Can't register events for non-prims return; - if(!part.ContainsScripts()) + if (!part.ContainsScripts()) return; - } public void RemoveObjectEvent(uint localID, string eventName, LLUUID id) diff --git a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/HttpRequest.cs b/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/HttpRequest.cs index 977e3f9..089e016 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/HttpRequest.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/HttpRequest.cs @@ -77,7 +77,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins foreach (XEngine xe in XEngine.ScriptEngines) { - if(xe.PostObjectEvent(httpInfo.localID, + if (xe.PostObjectEvent(httpInfo.localID, new XEventParams("http_response", resobj, new XDetectParams[0]))) break; diff --git a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/SensorRepeat.cs index 5a87bb0..dbd6c33 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/SensorRepeat.cs @@ -69,7 +69,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins private object SenseRepeatListLock = new object(); public void SetSenseRepeatEvent(uint m_localID, LLUUID m_itemID, - string name, LLUUID keyID, int type, double range, double arc, double sec, SceneObjectPart host) + string name, LLUUID keyID, int type, double range, + double arc, double sec, SceneObjectPart host) { Console.WriteLine("SetSensorEvent"); @@ -319,7 +320,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins new XDetectParams[SensedObjects.Length]; int idx; - for(idx = 0 ; idx < SensedObjects.Length; idx++) + for (idx = 0; idx < SensedObjects.Length; idx++) { detect[idx].Key=(LLUUID)(SensedObjects.Data[idx]); } @@ -339,7 +340,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins foreach (SenseRepeatClass ts in SenseRepeaters) { - if(ts.itemID == itemID) + if (ts.itemID == itemID) { data.Add(ts.interval); data.Add(ts.name); @@ -353,18 +354,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins } public void CreateFromData(uint localID, LLUUID itemID, LLUUID objectID, - Object[] data) + Object[] data) { SceneObjectPart part = - m_CmdManager.m_ScriptEngine.World.GetSceneObjectPart( + m_CmdManager.m_ScriptEngine.World.GetSceneObjectPart( objectID); - if(part == null) + if (part == null) return; - int idx=0; + int idx = 0; - while(idx < data.Length) + while (idx < data.Length) { SenseRepeatClass ts = new SenseRepeatClass(); @@ -380,12 +381,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins ts.host = part; ts.next = - DateTime.Now.ToUniversalTime().AddSeconds(ts.interval); + DateTime.Now.ToUniversalTime().AddSeconds(ts.interval); SenseRepeaters.Add(ts); idx += 6; } } - } } diff --git a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Timer.cs b/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Timer.cs index 09a5818..99be290 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Timer.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Timer.cs @@ -131,7 +131,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins { foreach (TimerClass ts in Timers) { - if(ts.itemID == itemID) + if (ts.itemID == itemID) { data.Add(ts.interval); data.Add(ts.next-DateTime.Now.Ticks); @@ -142,11 +142,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins } public void CreateFromData(uint localID, LLUUID itemID, LLUUID objectID, - Object[] data) + Object[] data) { - int idx=0; + int idx = 0; - while(idx < data.Length) + while (idx < data.Length) { TimerClass ts = new TimerClass(); diff --git a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/XmlRequest.cs b/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/XmlRequest.cs index 2714d11..288349e 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/XmlRequest.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/XmlRequest.cs @@ -71,10 +71,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins foreach (XEngine xe in XEngine.ScriptEngines) { - if(xe.PostScriptEvent( + if (xe.PostScriptEvent( rInfo.GetItemID(), new XEventParams( - "remote_data", resobj, - new XDetectParams[0]))) + "remote_data", resobj, + new XDetectParams[0]))) break; } @@ -100,10 +100,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins foreach (XEngine xe in XEngine.ScriptEngines) { - if(xe.PostScriptEvent( + if (xe.PostScriptEvent( srdInfo.m_itemID, new XEventParams( - "remote_data", resobj, - new XDetectParams[0]))) + "remote_data", resobj, + new XDetectParams[0]))) break; } -- cgit v1.1