diff options
author | Jeff Ames | 2008-06-04 09:59:27 +0000 |
---|---|---|
committer | Jeff Ames | 2008-06-04 09:59:27 +0000 |
commit | 4ec4e16c809cf86a63b736d2b7b6ad7291595a5f (patch) | |
tree | cfa896ef9057228171e2ee39c4807060101ba90b /OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins | |
parent | * If a ThreadAbortException reaches AuthUser() then let it pass through unmol... (diff) | |
download | opensim-SC_OLD-4ec4e16c809cf86a63b736d2b7b6ad7291595a5f.zip opensim-SC_OLD-4ec4e16c809cf86a63b736d2b7b6ad7291595a5f.tar.gz opensim-SC_OLD-4ec4e16c809cf86a63b736d2b7b6ad7291595a5f.tar.bz2 opensim-SC_OLD-4ec4e16c809cf86a63b736d2b7b6ad7291595a5f.tar.xz |
Formatting cleanup, minor refactoring, svn properties.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins')
6 files changed, 34 insertions, 35 deletions
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 | |||
57 | } | 57 | } |
58 | 58 | ||
59 | public LLUUID RegisterRequest(uint localID, LLUUID itemID, | 59 | public LLUUID RegisterRequest(uint localID, LLUUID itemID, |
60 | string identifier) | 60 | string identifier) |
61 | { | 61 | { |
62 | lock(DataserverRequests) | 62 | lock (DataserverRequests) |
63 | { | 63 | { |
64 | if(DataserverRequests.ContainsKey(identifier)) | 64 | if (DataserverRequests.ContainsKey(identifier)) |
65 | return LLUUID.Zero; | 65 | return LLUUID.Zero; |
66 | 66 | ||
67 | DataserverRequest ds = new DataserverRequest(); | 67 | DataserverRequest ds = new DataserverRequest(); |
@@ -84,9 +84,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
84 | { | 84 | { |
85 | DataserverRequest ds; | 85 | DataserverRequest ds; |
86 | 86 | ||
87 | lock(DataserverRequests) | 87 | lock (DataserverRequests) |
88 | { | 88 | { |
89 | if(!DataserverRequests.ContainsKey(identifier)) | 89 | if (!DataserverRequests.ContainsKey(identifier)) |
90 | return; | 90 | return; |
91 | 91 | ||
92 | ds=DataserverRequests[identifier]; | 92 | ds=DataserverRequests[identifier]; |
@@ -94,7 +94,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
94 | } | 94 | } |
95 | 95 | ||
96 | m_CmdManager.m_ScriptEngine.PostObjectEvent(ds.localID, | 96 | m_CmdManager.m_ScriptEngine.PostObjectEvent(ds.localID, |
97 | new XEventParams( "dataserver", new Object[] | 97 | new XEventParams("dataserver", new Object[] |
98 | { new LSL_Types.LSLString(ds.ID.ToString()), | 98 | { new LSL_Types.LSLString(ds.ID.ToString()), |
99 | new LSL_Types.LSLString(reply)}, | 99 | new LSL_Types.LSLString(reply)}, |
100 | new XDetectParams[0])); | 100 | new XDetectParams[0])); |
@@ -102,11 +102,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
102 | 102 | ||
103 | public void RemoveEvents(uint localID, LLUUID itemID) | 103 | public void RemoveEvents(uint localID, LLUUID itemID) |
104 | { | 104 | { |
105 | lock(DataserverRequests) | 105 | lock (DataserverRequests) |
106 | { | 106 | { |
107 | foreach (DataserverRequest ds in new List<DataserverRequest>(DataserverRequests.Values)) | 107 | foreach (DataserverRequest ds in new List<DataserverRequest>(DataserverRequests.Values)) |
108 | { | 108 | { |
109 | if(ds.itemID == itemID) | 109 | if (ds.itemID == itemID) |
110 | DataserverRequests.Remove(ds.handle); | 110 | DataserverRequests.Remove(ds.handle); |
111 | } | 111 | } |
112 | } | 112 | } |
@@ -114,11 +114,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
114 | 114 | ||
115 | public void ExpireRequests() | 115 | public void ExpireRequests() |
116 | { | 116 | { |
117 | lock(DataserverRequests) | 117 | lock (DataserverRequests) |
118 | { | 118 | { |
119 | foreach (DataserverRequest ds in new List<DataserverRequest>(DataserverRequests.Values)) | 119 | foreach (DataserverRequest ds in new List<DataserverRequest>(DataserverRequests.Values)) |
120 | { | 120 | { |
121 | if(ds.startTime > DateTime.Now.AddSeconds(30)) | 121 | if (ds.startTime > DateTime.Now.AddSeconds(30)) |
122 | DataserverRequests.Remove(ds.handle); | 122 | DataserverRequests.Remove(ds.handle); |
123 | } | 123 | } |
124 | } | 124 | } |
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 | |||
55 | public void AddObjectEvent(uint localID, string eventName, XDetectParams det) | 55 | public void AddObjectEvent(uint localID, string eventName, XDetectParams det) |
56 | { | 56 | { |
57 | SceneObjectPart part = m_CmdManager.m_ScriptEngine.World. | 57 | SceneObjectPart part = m_CmdManager.m_ScriptEngine.World. |
58 | GetSceneObjectPart(localID); | 58 | GetSceneObjectPart(localID); |
59 | 59 | ||
60 | if(part == null) // Can't register events for non-prims | 60 | if (part == null) // Can't register events for non-prims |
61 | return; | 61 | return; |
62 | 62 | ||
63 | if(!part.ContainsScripts()) | 63 | if (!part.ContainsScripts()) |
64 | return; | 64 | return; |
65 | |||
66 | } | 65 | } |
67 | 66 | ||
68 | public void RemoveObjectEvent(uint localID, string eventName, LLUUID id) | 67 | 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 | |||
77 | 77 | ||
78 | foreach (XEngine xe in XEngine.ScriptEngines) | 78 | foreach (XEngine xe in XEngine.ScriptEngines) |
79 | { | 79 | { |
80 | if(xe.PostObjectEvent(httpInfo.localID, | 80 | if (xe.PostObjectEvent(httpInfo.localID, |
81 | new XEventParams("http_response", | 81 | new XEventParams("http_response", |
82 | resobj, new XDetectParams[0]))) | 82 | resobj, new XDetectParams[0]))) |
83 | break; | 83 | 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 | |||
69 | private object SenseRepeatListLock = new object(); | 69 | private object SenseRepeatListLock = new object(); |
70 | 70 | ||
71 | public void SetSenseRepeatEvent(uint m_localID, LLUUID m_itemID, | 71 | public void SetSenseRepeatEvent(uint m_localID, LLUUID m_itemID, |
72 | string name, LLUUID keyID, int type, double range, double arc, double sec, SceneObjectPart host) | 72 | string name, LLUUID keyID, int type, double range, |
73 | double arc, double sec, SceneObjectPart host) | ||
73 | { | 74 | { |
74 | Console.WriteLine("SetSensorEvent"); | 75 | Console.WriteLine("SetSensorEvent"); |
75 | 76 | ||
@@ -319,7 +320,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
319 | new XDetectParams[SensedObjects.Length]; | 320 | new XDetectParams[SensedObjects.Length]; |
320 | 321 | ||
321 | int idx; | 322 | int idx; |
322 | for(idx = 0 ; idx < SensedObjects.Length; idx++) | 323 | for (idx = 0; idx < SensedObjects.Length; idx++) |
323 | { | 324 | { |
324 | detect[idx].Key=(LLUUID)(SensedObjects.Data[idx]); | 325 | detect[idx].Key=(LLUUID)(SensedObjects.Data[idx]); |
325 | } | 326 | } |
@@ -339,7 +340,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
339 | 340 | ||
340 | foreach (SenseRepeatClass ts in SenseRepeaters) | 341 | foreach (SenseRepeatClass ts in SenseRepeaters) |
341 | { | 342 | { |
342 | if(ts.itemID == itemID) | 343 | if (ts.itemID == itemID) |
343 | { | 344 | { |
344 | data.Add(ts.interval); | 345 | data.Add(ts.interval); |
345 | data.Add(ts.name); | 346 | data.Add(ts.name); |
@@ -353,18 +354,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
353 | } | 354 | } |
354 | 355 | ||
355 | public void CreateFromData(uint localID, LLUUID itemID, LLUUID objectID, | 356 | public void CreateFromData(uint localID, LLUUID itemID, LLUUID objectID, |
356 | Object[] data) | 357 | Object[] data) |
357 | { | 358 | { |
358 | SceneObjectPart part = | 359 | SceneObjectPart part = |
359 | m_CmdManager.m_ScriptEngine.World.GetSceneObjectPart( | 360 | m_CmdManager.m_ScriptEngine.World.GetSceneObjectPart( |
360 | objectID); | 361 | objectID); |
361 | 362 | ||
362 | if(part == null) | 363 | if (part == null) |
363 | return; | 364 | return; |
364 | 365 | ||
365 | int idx=0; | 366 | int idx = 0; |
366 | 367 | ||
367 | while(idx < data.Length) | 368 | while (idx < data.Length) |
368 | { | 369 | { |
369 | SenseRepeatClass ts = new SenseRepeatClass(); | 370 | SenseRepeatClass ts = new SenseRepeatClass(); |
370 | 371 | ||
@@ -380,12 +381,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
380 | ts.host = part; | 381 | ts.host = part; |
381 | 382 | ||
382 | ts.next = | 383 | ts.next = |
383 | DateTime.Now.ToUniversalTime().AddSeconds(ts.interval); | 384 | DateTime.Now.ToUniversalTime().AddSeconds(ts.interval); |
384 | 385 | ||
385 | SenseRepeaters.Add(ts); | 386 | SenseRepeaters.Add(ts); |
386 | idx += 6; | 387 | idx += 6; |
387 | } | 388 | } |
388 | } | 389 | } |
389 | |||
390 | } | 390 | } |
391 | } | 391 | } |
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 | |||
131 | { | 131 | { |
132 | foreach (TimerClass ts in Timers) | 132 | foreach (TimerClass ts in Timers) |
133 | { | 133 | { |
134 | if(ts.itemID == itemID) | 134 | if (ts.itemID == itemID) |
135 | { | 135 | { |
136 | data.Add(ts.interval); | 136 | data.Add(ts.interval); |
137 | data.Add(ts.next-DateTime.Now.Ticks); | 137 | data.Add(ts.next-DateTime.Now.Ticks); |
@@ -142,11 +142,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
142 | } | 142 | } |
143 | 143 | ||
144 | public void CreateFromData(uint localID, LLUUID itemID, LLUUID objectID, | 144 | public void CreateFromData(uint localID, LLUUID itemID, LLUUID objectID, |
145 | Object[] data) | 145 | Object[] data) |
146 | { | 146 | { |
147 | int idx=0; | 147 | int idx = 0; |
148 | 148 | ||
149 | while(idx < data.Length) | 149 | while (idx < data.Length) |
150 | { | 150 | { |
151 | TimerClass ts = new TimerClass(); | 151 | TimerClass ts = new TimerClass(); |
152 | 152 | ||
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 | |||
71 | 71 | ||
72 | foreach (XEngine xe in XEngine.ScriptEngines) | 72 | foreach (XEngine xe in XEngine.ScriptEngines) |
73 | { | 73 | { |
74 | if(xe.PostScriptEvent( | 74 | if (xe.PostScriptEvent( |
75 | rInfo.GetItemID(), new XEventParams( | 75 | rInfo.GetItemID(), new XEventParams( |
76 | "remote_data", resobj, | 76 | "remote_data", resobj, |
77 | new XDetectParams[0]))) | 77 | new XDetectParams[0]))) |
78 | break; | 78 | break; |
79 | } | 79 | } |
80 | 80 | ||
@@ -100,10 +100,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
100 | 100 | ||
101 | foreach (XEngine xe in XEngine.ScriptEngines) | 101 | foreach (XEngine xe in XEngine.ScriptEngines) |
102 | { | 102 | { |
103 | if(xe.PostScriptEvent( | 103 | if (xe.PostScriptEvent( |
104 | srdInfo.m_itemID, new XEventParams( | 104 | srdInfo.m_itemID, new XEventParams( |
105 | "remote_data", resobj, | 105 | "remote_data", resobj, |
106 | new XDetectParams[0]))) | 106 | new XDetectParams[0]))) |
107 | break; | 107 | break; |
108 | } | 108 | } |
109 | 109 | ||