aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs2
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs4
-rw-r--r--OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs2
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs46
-rw-r--r--OpenSim/Region/Physics/Meshing/PrimMesher.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs93
9 files changed, 81 insertions, 84 deletions
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
index 535a5ea..c043363 100644
--- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
+++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs
@@ -52,7 +52,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
52 public void Initialise() 52 public void Initialise()
53 { 53 {
54 m_log.Info("[LOADREGIONS]: " + Name + " cannot be default-initialized!"); 54 m_log.Info("[LOADREGIONS]: " + Name + " cannot be default-initialized!");
55 throw new PluginNotInitialisedException (Name); 55 throw new PluginNotInitialisedException(Name);
56 } 56 }
57 57
58 public void Initialise(OpenSimBase openSim) 58 public void Initialise(OpenSimBase openSim)
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 3bd80f5..6691f14 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -416,10 +416,6 @@ namespace OpenSim.ApplicationPlugins.RemoteController
416 scene.RegionInfo.RegionName, scene.RegionInfo.RegionID, 416 scene.RegionInfo.RegionName, scene.RegionInfo.RegionID,
417 scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY)); 417 scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY));
418 418
419 // Security risk [and apparently not used]
420 // if (requestData.ContainsKey("datastore"))
421 // region.DataStore = (string) requestData["datastore"];
422
423 region.InternalEndPoint = 419 region.InternalEndPoint =
424 new IPEndPoint(IPAddress.Parse((string) requestData["listen_ip"]), 0); 420 new IPEndPoint(IPAddress.Parse((string) requestData["listen_ip"]), 0);
425 421
diff --git a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs b/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs
index 4667070..a371851 100644
--- a/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs
+++ b/OpenSim/Framework/RegionLoader/Filesystem/RegionLoaderFileSystem.cs
@@ -70,7 +70,7 @@ namespace OpenSim.Framework.RegionLoader.Filesystem
70 RegionInfo[] regionInfos = new RegionInfo[configFiles.Length]; 70 RegionInfo[] regionInfos = new RegionInfo[configFiles.Length];
71 for (int i = 0; i < configFiles.Length; i++) 71 for (int i = 0; i < configFiles.Length; i++)
72 { 72 {
73 RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), configFiles[i],false); 73 RegionInfo regionInfo = new RegionInfo("REGION CONFIG #" + (i + 1), configFiles[i], false);
74 regionInfos[i] = regionInfo; 74 regionInfos[i] = regionInfo;
75 } 75 }
76 76
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index ce4fdfe..4003001 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -475,7 +475,7 @@ namespace OpenSim
475 { 475 {
476 int port = regionInfo.InternalEndPoint.Port; 476 int port = regionInfo.InternalEndPoint.Port;
477 477
478 // set initial RegionID to originRegionID in RegionInfo. (it needs for loding prims) 478 // set initial originRegionID to RegionID in RegionInfo. (it needs for loding prims)
479 regionInfo.originRegionID = regionInfo.RegionID; 479 regionInfo.originRegionID = regionInfo.RegionID;
480 480
481 // set initial ServerURI 481 // set initial ServerURI
@@ -517,7 +517,7 @@ namespace OpenSim
517 m_log.Info("[MODULES]: Loading scripting engine: " + mod); 517 m_log.Info("[MODULES]: Loading scripting engine: " + mod);
518 try 518 try
519 { 519 {
520 m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", mod), scene); 520 modules.AddRange(m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", mod), scene));
521 } 521 }
522 catch (Exception ex) 522 catch (Exception ex)
523 { 523 {
@@ -540,11 +540,13 @@ namespace OpenSim
540 { 540 {
541 m_log.ErrorFormat("[STARTUP]: Registration of region with grid failed, aborting startup - {0}", e); 541 m_log.ErrorFormat("[STARTUP]: Registration of region with grid failed, aborting startup - {0}", e);
542 542
543 // Carrying on now causes a lot of confusion down the line - we need to get the user's attention 543 // Carrying on now causes a lot of confusion down the
544 // line - we need to get the user's attention
544 System.Environment.Exit(1); 545 System.Environment.Exit(1);
545 } 546 }
546 547
547 // We need to do this after we've initialized the scripting engines. 548 // We need to do this after we've initialized the
549 // scripting engines.
548 scene.CreateScriptInstances(); 550 scene.CreateScriptInstances();
549 551
550 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID); 552 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
diff --git a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
index 90b7bcf..dbe045a 100644
--- a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
+++ b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
@@ -123,10 +123,10 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
123 { 123 {
124 try 124 try
125 { 125 {
126#pragma warning disable 0612 126#pragma warning disable 0612, 0618
127 // Mono does not implement the ServicePointManager.ServerCertificateValidationCallback yet! Don't remove this! 127 // Mono does not implement the ServicePointManager.ServerCertificateValidationCallback yet! Don't remove this!
128 ServicePointManager.CertificatePolicy = new MonoCert(); 128 ServicePointManager.CertificatePolicy = new MonoCert();
129#pragma warning restore 0612 129#pragma warning restore 0612, 0618
130 } 130 }
131 catch (Exception) 131 catch (Exception)
132 { 132 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index eb6b9cc..3bfe7e9 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -164,10 +164,11 @@ namespace OpenSim.Region.Environment.Scenes
164 /// <returns></returns> 164 /// <returns></returns>
165 public void CreateScriptInstance(TaskInventoryItem item, int startParam, bool postOnRez) 165 public void CreateScriptInstance(TaskInventoryItem item, int startParam, bool postOnRez)
166 { 166 {
167 // m_log.InfoFormat( 167 // m_log.InfoFormat(
168 // "[PRIM INVENTORY]: " + 168 // "[PRIM INVENTORY]: " +
169 // "Starting script {0}, {1} in prim {2}, {3}", 169 // "Starting script {0}, {1} in prim {2}, {3}",
170 // item.Name, item.ItemID, Name, UUID); 170 // item.Name, item.ItemID, Name, UUID);
171
171 if (!m_parentGroup.Scene.ExternalChecks.ExternalChecksCanRunScript(item.ItemID, UUID, item.OwnerID)) 172 if (!m_parentGroup.Scene.ExternalChecks.ExternalChecksCanRunScript(item.ItemID, UUID, item.OwnerID))
172 return; 173 return;
173 174
@@ -178,24 +179,25 @@ namespace OpenSim.Region.Environment.Scenes
178 AssetCache cache = m_parentGroup.Scene.AssetCache; 179 AssetCache cache = m_parentGroup.Scene.AssetCache;
179 180
180 cache.GetAsset(item.AssetID, delegate(LLUUID assetID, AssetBase asset) 181 cache.GetAsset(item.AssetID, delegate(LLUUID assetID, AssetBase asset)
181 { 182 {
182 if (null == asset) 183 if (null == asset)
183 { 184 {
184 m_log.ErrorFormat( 185 m_log.ErrorFormat(
185 "[PRIM INVENTORY]: " + 186 "[PRIM INVENTORY]: " +
186 "Couldn't start script {0}, {1} since asset ID {2} could not be found", 187 "Couldn't start script {0}, {1} since asset ID {2} could not be found",
187 item.Name, item.ItemID, item.AssetID); 188 item.Name, item.ItemID, item.AssetID);
188 } 189 }
189 else 190 else
190 { 191 {
191 m_taskInventory[item.ItemID].PermsMask = 0; 192 m_taskInventory[item.ItemID].PermsMask = 0;
192 m_taskInventory[item.ItemID].PermsGranter = LLUUID.Zero; 193 m_taskInventory[item.ItemID].PermsGranter = LLUUID.Zero;
193 string script = Helpers.FieldToUTF8String(asset.Data); 194 string script = Helpers.FieldToUTF8String(asset.Data);
194 m_parentGroup.Scene.EventManager.TriggerRezScript(LocalId, item.ItemID,script, startParam, postOnRez); 195 m_parentGroup.Scene.EventManager.TriggerRezScript(LocalId, item.ItemID, script,
195 m_parentGroup.AddActiveScriptCount(1); 196 startParam, postOnRez);
196 ScheduleFullUpdate(); 197 m_parentGroup.AddActiveScriptCount(1);
197 } 198 ScheduleFullUpdate();
198 }, false); 199 }
200 }, false);
199 } 201 }
200 } 202 }
201 203
diff --git a/OpenSim/Region/Physics/Meshing/PrimMesher.cs b/OpenSim/Region/Physics/Meshing/PrimMesher.cs
index f03aa7c..e15804e 100644
--- a/OpenSim/Region/Physics/Meshing/PrimMesher.cs
+++ b/OpenSim/Region/Physics/Meshing/PrimMesher.cs
@@ -196,7 +196,7 @@ namespace OpenSim.Region.Physics.Meshing
196 196
197 float startAngle = profileStart * twoPi; 197 float startAngle = profileStart * twoPi;
198 float stopAngle = profileEnd * twoPi; 198 float stopAngle = profileEnd * twoPi;
199 float stepSize = twoPi / sides; 199 // float stepSize = twoPi / sides;
200 200
201 try { angles.makeAngles(sides, startAngle, stopAngle); } 201 try { angles.makeAngles(sides, startAngle, stopAngle); }
202 catch (Exception ex) 202 catch (Exception ex)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs
index 0241da5..aee03ef 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs
@@ -90,7 +90,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
90 /// Make sure our object does not timeout when in AppDomain. (Called by ILease base class) 90 /// Make sure our object does not timeout when in AppDomain. (Called by ILease base class)
91 /// </summary> 91 /// </summary>
92 /// <returns></returns> 92 /// <returns></returns>
93 public Object InitializeLifetimeService() 93 public override Object InitializeLifetimeService()
94 { 94 {
95 //Console.WriteLine("Executor: InitializeLifetimeService()"); 95 //Console.WriteLine("Executor: InitializeLifetimeService()");
96 // return null; 96 // return null;
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index f9f8883..8ad8110 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -145,11 +145,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
145 public void Initialise(Scene scene, IConfigSource configSource) 145 public void Initialise(Scene scene, IConfigSource configSource)
146 { 146 {
147 AppDomain.CurrentDomain.AssemblyResolve += 147 AppDomain.CurrentDomain.AssemblyResolve +=
148 OnAssemblyResolve; 148 OnAssemblyResolve;
149 149
150 m_log.InfoFormat("[XEngine] Initializing scripts in region {0}", 150 m_log.InfoFormat("[XEngine] Initializing scripts in region {0}",
151 scene.RegionInfo.RegionName); 151 scene.RegionInfo.RegionName);
152 m_Scene=scene; 152 m_Scene = scene;
153 153
154 m_ScriptConfig = configSource.Configs["XEngine"]; 154 m_ScriptConfig = configSource.Configs["XEngine"];
155 155
@@ -165,34 +165,31 @@ namespace OpenSim.Region.ScriptEngine.XEngine
165 string priority = m_ScriptConfig.GetString("Priority", "BelowNormal"); 165 string priority = m_ScriptConfig.GetString("Priority", "BelowNormal");
166 int maxScriptQueue = m_ScriptConfig.GetInt("MaxScriptEventQueue",300); 166 int maxScriptQueue = m_ScriptConfig.GetInt("MaxScriptEventQueue",300);
167 int stackSize = m_ScriptConfig.GetInt("ThreadStackSize", 262144); 167 int stackSize = m_ScriptConfig.GetInt("ThreadStackSize", 262144);
168 int sleepTime = m_ScriptConfig.GetInt("MaintenanceInterval", 168 int sleepTime = m_ScriptConfig.GetInt("MaintenanceInterval", 10)*1000;
169 10)*1000;
170 m_EventLimit = m_ScriptConfig.GetInt("EventLimit", 30); 169 m_EventLimit = m_ScriptConfig.GetInt("EventLimit", 30);
171 m_KillTimedOutScripts = m_ScriptConfig.GetBoolean( 170 m_KillTimedOutScripts = m_ScriptConfig.GetBoolean("KillTimedOutScripts", false);
172 "KillTimedOutScripts", false);
173 int saveTime = m_ScriptConfig.GetInt("SaveInterval", 300)*1000; 171 int saveTime = m_ScriptConfig.GetInt("SaveInterval", 300)*1000;
174 172
175 ThreadPriority prio = ThreadPriority.BelowNormal; 173 ThreadPriority prio = ThreadPriority.BelowNormal;
176 switch (priority) 174 switch (priority)
177 { 175 {
178 case "Lowest": 176 case "Lowest":
179 prio=ThreadPriority.Lowest; 177 prio = ThreadPriority.Lowest;
180 break; 178 break;
181 case "BelowNormal": 179 case "BelowNormal":
182 prio=ThreadPriority.BelowNormal; 180 prio = ThreadPriority.BelowNormal;
183 break; 181 break;
184 case "Normal": 182 case "Normal":
185 prio=ThreadPriority.Normal; 183 prio = ThreadPriority.Normal;
186 break; 184 break;
187 case "AboveNormal": 185 case "AboveNormal":
188 prio=ThreadPriority.AboveNormal; 186 prio = ThreadPriority.AboveNormal;
189 break; 187 break;
190 case "Highest": 188 case "Highest":
191 prio=ThreadPriority.Highest; 189 prio = ThreadPriority.Highest;
192 break; 190 break;
193 default: 191 default:
194 m_log.ErrorFormat("[XEngine] Invalid thread priority: '"+ 192 m_log.ErrorFormat("[XEngine] Invalid thread priority: '{0}'. Assuming BelowNormal", priority);
195 priority+"'. Assuming BelowNormal");
196 break; 193 break;
197 } 194 }
198 195
@@ -204,7 +201,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
204 m_EventManager = new EventManager(this); 201 m_EventManager = new EventManager(this);
205 202
206 StartEngine(minThreads, maxThreads, idleTimeout, prio, 203 StartEngine(minThreads, maxThreads, idleTimeout, prio,
207 maxScriptQueue, stackSize); 204 maxScriptQueue, stackSize);
208 205
209 m_Compiler = new Compiler(this); 206 m_Compiler = new Compiler(this);
210 207
@@ -218,15 +215,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine
218 215
219 if (sleepTime > 0) 216 if (sleepTime > 0)
220 { 217 {
221 m_ThreadPool.QueueWorkItem(new WorkItemCallback( 218 m_ThreadPool.QueueWorkItem(new WorkItemCallback(this.DoMaintenance),
222 this.DoMaintenance), new Object[] 219 new Object[]{ sleepTime });
223 { sleepTime });
224 } 220 }
225 221
226 if (saveTime > 0) 222 if (saveTime > 0)
227 { 223 {
228 m_ThreadPool.QueueWorkItem(new WorkItemCallback( 224 m_ThreadPool.QueueWorkItem(new WorkItemCallback(this.DoBackup),
229 this.DoBackup), new Object[] { saveTime }); 225 new Object[] { saveTime });
230 } 226 }
231 227
232 scene.RegisterModuleInterface<IScriptModule>(this); 228 scene.RegisterModuleInterface<IScriptModule>(this);
@@ -279,8 +275,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
279 275
280 instances.Clear(); 276 instances.Clear();
281 277
282 m_ThreadPool.QueueWorkItem(new WorkItemCallback( 278 m_ThreadPool.QueueWorkItem(new WorkItemCallback(this.DoBackup),
283 this.DoBackup), new Object[] { saveTime }); 279 new Object[] { saveTime });
284 280
285 return 0; 281 return 0;
286 } 282 }
@@ -302,9 +298,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
302 298
303 System.Threading.Thread.Sleep(sleepTime); 299 System.Threading.Thread.Sleep(sleepTime);
304 300
305 m_ThreadPool.QueueWorkItem(new WorkItemCallback( 301 m_ThreadPool.QueueWorkItem(new WorkItemCallback(this.DoMaintenance),
306 this.DoMaintenance), new Object[] 302 new Object[]{ sleepTime });
307 { sleepTime });
308 303
309 return 0; 304 return 0;
310 } 305 }
@@ -321,25 +316,26 @@ namespace OpenSim.Region.ScriptEngine.XEngine
321 316
322 public void OnRezScript(uint localID, LLUUID itemID, string script, int startParam, bool postOnRez) 317 public void OnRezScript(uint localID, LLUUID itemID, string script, int startParam, bool postOnRez)
323 { 318 {
324 Object[] parms = new Object[] 319 Object[] parms = new Object[]{localID, itemID, script, startParam, postOnRez};
325 { localID, itemID, script, startParam, postOnRez};
326 320
327 lock (m_CompileQueue) 321 lock (m_CompileQueue)
328 { 322 {
329 m_CompileQueue.Enqueue(parms); 323 m_CompileQueue.Enqueue(parms);
324
330 if (m_CurrentCompile == null) 325 if (m_CurrentCompile == null)
331 { 326 {
332 if (m_firstStart) 327 if (m_firstStart)
333 { 328 {
334 m_firstStart = false; 329 m_firstStart = false;
335 m_CurrentCompile = m_ThreadPool.QueueWorkItem( 330 m_CurrentCompile = m_ThreadPool.QueueWorkItem(
336 new WorkItemCallback( 331 new WorkItemCallback(this.DoScriptWait),
337 this.DoScriptWait), new Object[0]); 332 new Object[0]);
338 return; 333 return;
339 } 334 }
335
340 m_CurrentCompile = m_ThreadPool.QueueWorkItem( 336 m_CurrentCompile = m_ThreadPool.QueueWorkItem(
341 new WorkItemCallback( 337 new WorkItemCallback(this.DoOnRezScriptQueue),
342 this.DoOnRezScriptQueue), new Object[0]); 338 new Object[0]);
343 } 339 }
344 } 340 }
345 } 341 }
@@ -353,8 +349,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
353 if (m_CompileQueue.Count > 0) 349 if (m_CompileQueue.Count > 0)
354 { 350 {
355 m_CurrentCompile = m_ThreadPool.QueueWorkItem( 351 m_CurrentCompile = m_ThreadPool.QueueWorkItem(
356 new WorkItemCallback( 352 new WorkItemCallback(this.DoOnRezScriptQueue),
357 this.DoOnRezScriptQueue), new Object[0]); 353 new Object[0]);
358 } 354 }
359 else 355 else
360 { 356 {
@@ -384,8 +380,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
384 if (m_CompileQueue.Count > 0) 380 if (m_CompileQueue.Count > 0)
385 { 381 {
386 m_CurrentCompile = m_ThreadPool.QueueWorkItem( 382 m_CurrentCompile = m_ThreadPool.QueueWorkItem(
387 new WorkItemCallback( 383 new WorkItemCallback(this.DoOnRezScriptQueue),
388 this.DoOnRezScriptQueue), new Object[0]); 384 new Object[0]);
389 } 385 }
390 else 386 else
391 { 387 {
@@ -459,7 +455,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
459 if ((!m_Scripts.ContainsKey(itemID)) || 455 if ((!m_Scripts.ContainsKey(itemID)) ||
460 (m_Scripts[itemID].AssetID != assetID)) 456 (m_Scripts[itemID].AssetID != assetID))
461 { 457 {
462 LLUUID appDomain=assetID; 458 LLUUID appDomain = assetID;
463 459
464 if (part.ParentGroup.RootPart.IsAttachment) 460 if (part.ParentGroup.RootPart.IsAttachment)
465 appDomain = part.ParentGroup.RootPart.UUID; 461 appDomain = part.ParentGroup.RootPart.UUID;
@@ -473,8 +469,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
473// "ScriptEngines", 469// "ScriptEngines",
474// m_Scene.RegionInfo.RegionID.ToString()); 470// m_Scene.RegionInfo.RegionID.ToString());
475 471
476 Evidence baseEvidence = 472 Evidence baseEvidence = AppDomain.CurrentDomain.Evidence;
477 AppDomain.CurrentDomain.Evidence;
478 Evidence evidence = new Evidence(baseEvidence); 473 Evidence evidence = new Evidence(baseEvidence);
479 474
480 m_AppDomains[appDomain] = 475 m_AppDomains[appDomain] =
@@ -489,18 +484,19 @@ namespace OpenSim.Region.ScriptEngine.XEngine
489 } 484 }
490 catch (Exception e) 485 catch (Exception e)
491 { 486 {
492 m_log.Error("[XEngine] Exception creating app domain:\n"+e.ToString()); 487 m_log.ErrorFormat("[XEngine] Exception creating app domain:\n {0}", e.ToString());
493 return false; 488 return false;
494 } 489 }
495 } 490 }
496 m_DomainScripts[appDomain].Add(itemID); 491 m_DomainScripts[appDomain].Add(itemID);
497 492
498 ScriptInstance instance = new ScriptInstance(this,localID, 493 ScriptInstance instance =
499 part.UUID, itemID, assetID, assembly, 494 new ScriptInstance(this,localID,
500 m_AppDomains[appDomain], 495 part.UUID, itemID, assetID, assembly,
501 part.ParentGroup.RootPart.Name, 496 m_AppDomains[appDomain],
502 item.Name, startParam, postOnRez, 497 part.ParentGroup.RootPart.Name,
503 StateSource.NewRez, m_MaxScriptQueue); 498 item.Name, startParam, postOnRez,
499 StateSource.NewRez, m_MaxScriptQueue);
504 500
505 m_log.DebugFormat("[XEngine] Loaded script {0}.{1}", 501 m_log.DebugFormat("[XEngine] Loaded script {0}.{1}",
506 part.ParentGroup.RootPart.Name, item.Name); 502 part.ParentGroup.RootPart.Name, item.Name);
@@ -657,8 +653,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
657 // 653 //
658 public IScriptWorkItem QueueEventHandler(object parms) 654 public IScriptWorkItem QueueEventHandler(object parms)
659 { 655 {
660 return new XWorkItem(m_ThreadPool.QueueWorkItem(new WorkItemCallback( 656 return new XWorkItem(m_ThreadPool.QueueWorkItem(
661 this.ProcessEventHandler), parms)); 657 new WorkItemCallback(this.ProcessEventHandler),
658 parms));
662 } 659 }
663 660
664 // 661 //
@@ -723,7 +720,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
723 string[] pathList = new string[] {"bin", "ScriptEngines", 720 string[] pathList = new string[] {"bin", "ScriptEngines",
724 Path.Combine("ScriptEngines", 721 Path.Combine("ScriptEngines",
725 m_Scene.RegionInfo.RegionID.ToString())}; 722 m_Scene.RegionInfo.RegionID.ToString())};
726 723
727 string assemblyName = args.Name; 724 string assemblyName = args.Name;
728 if (assemblyName.IndexOf(",") != -1) 725 if (assemblyName.IndexOf(",") != -1)
729 assemblyName = args.Name.Substring(0, args.Name.IndexOf(",")); 726 assemblyName = args.Name.Substring(0, args.Name.IndexOf(","));