aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Servers/VersionInfo.cs2
-rw-r--r--OpenSim/Framework/Util.cs26
-rw-r--r--OpenSim/Region/Application/OpenSim.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs105
-rw-r--r--bin/OpenSim.ini.example5
-rw-r--r--prebuild.xml45
6 files changed, 102 insertions, 83 deletions
diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs
index 9f98310..812abd1 100644
--- a/OpenSim/Framework/Servers/VersionInfo.cs
+++ b/OpenSim/Framework/Servers/VersionInfo.cs
@@ -29,7 +29,7 @@ namespace OpenSim
29{ 29{
30 public class VersionInfo 30 public class VersionInfo
31 { 31 {
32 private const string VERSION_NUMBER = "0.6.8"; 32 private const string VERSION_NUMBER = "0.6.8-mel_t";
33 private const Flavour VERSION_FLAVOUR = Flavour.Dev; 33 private const Flavour VERSION_FLAVOUR = Flavour.Dev;
34 34
35 public enum Flavour 35 public enum Flavour
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 02f6d12..d09bd6d 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -41,12 +41,14 @@ using System.Security.Cryptography;
41using System.Text; 41using System.Text;
42using System.Text.RegularExpressions; 42using System.Text.RegularExpressions;
43using System.Xml; 43using System.Xml;
44using System.Threading;
44using log4net; 45using log4net;
45using Nini.Config; 46using Nini.Config;
46using Nwc.XmlRpc; 47using Nwc.XmlRpc;
47using BclExtras; 48using BclExtras;
48using OpenMetaverse; 49using OpenMetaverse;
49using OpenMetaverse.StructuredData; 50using OpenMetaverse.StructuredData;
51using Amib.Threading;
50 52
51namespace OpenSim.Framework 53namespace OpenSim.Framework
52{ 54{
@@ -67,6 +69,8 @@ namespace OpenSim.Framework
67 /// </summary> 69 /// </summary>
68 public class Util 70 public class Util
69 { 71 {
72 private static SmartThreadPool m_ThreadPool = null;
73
70 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 74 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
71 75
72 private static uint nextXferID = 5000; 76 private static uint nextXferID = 5000;
@@ -83,7 +87,7 @@ namespace OpenSim.Framework
83 public static readonly Regex UUIDPattern 87 public static readonly Regex UUIDPattern
84 = new Regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"); 88 = new Regex("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$");
85 89
86 public static FireAndForgetMethod FireAndForgetMethod = FireAndForgetMethod.UnsafeQueueUserWorkItem; 90 public static FireAndForgetMethod FireAndForgetMethod = FireAndForgetMethod.SmartThreadPool;
87 91
88 /// <summary> 92 /// <summary>
89 /// Linear interpolates B<->C using percent A 93 /// Linear interpolates B<->C using percent A
@@ -1315,6 +1319,23 @@ namespace OpenSim.Framework
1315 FireAndForget(callback, null); 1319 FireAndForget(callback, null);
1316 } 1320 }
1317 1321
1322 public static void SetMaxThreads(int maxThreads)
1323 {
1324 if (m_ThreadPool != null)
1325 return;
1326
1327 STPStartInfo startInfo = new STPStartInfo();
1328 startInfo.IdleTimeout = 2000; // 2 seconds
1329 startInfo.MaxWorkerThreads = maxThreads;
1330 startInfo.MinWorkerThreads = 2;
1331 startInfo.StackSize = 524288;
1332 startInfo.ThreadPriority = ThreadPriority.Normal;
1333
1334 startInfo.StartSuspended = false;
1335
1336 m_ThreadPool = new SmartThreadPool(startInfo);
1337 }
1338
1318 public static void FireAndForget(System.Threading.WaitCallback callback, object obj) 1339 public static void FireAndForget(System.Threading.WaitCallback callback, object obj)
1319 { 1340 {
1320 switch (FireAndForgetMethod) 1341 switch (FireAndForgetMethod)
@@ -1330,8 +1351,7 @@ namespace OpenSim.Framework
1330 wrapper.FireAndForget(callback, obj); 1351 wrapper.FireAndForget(callback, obj);
1331 break; 1352 break;
1332 case FireAndForgetMethod.SmartThreadPool: 1353 case FireAndForgetMethod.SmartThreadPool:
1333 Amib.Threading.SmartThreadPool stp = Singleton.GetInstance<Amib.Threading.SmartThreadPool>(); 1354 m_ThreadPool.QueueWorkItem(delegate(object o) { callback(o); return null; }, obj);
1334 stp.QueueWorkItem(delegate(object o) { callback(o); return null; }, obj);
1335 break; 1355 break;
1336 case FireAndForgetMethod.Thread: 1356 case FireAndForgetMethod.Thread:
1337 System.Threading.Thread thread = new System.Threading.Thread(delegate(object o) { callback(o); }); 1357 System.Threading.Thread thread = new System.Threading.Thread(delegate(object o) { callback(o); });
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 5be1816..c04b8c2 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -67,6 +67,8 @@ namespace OpenSim
67 67
68 IConfig startupConfig = m_config.Source.Configs["Startup"]; 68 IConfig startupConfig = m_config.Source.Configs["Startup"];
69 69
70 Util.SetMaxThreads(startupConfig.GetInt("MaxPoolThreads", 15));
71
70 if (startupConfig != null) 72 if (startupConfig != null)
71 { 73 {
72 m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", "startup_commands.txt"); 74 m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", "startup_commands.txt");
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index a94b4e4..6e17639 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -133,13 +133,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
133 return lease; 133 return lease;
134 } 134 }
135 135
136 protected virtual void ConditionalScriptSleep(int delay)
137 {
138 // Uncomment to get SL compatibility!
139 //
140 // ScriptSleep(delay);
141 }
142
143 protected virtual void ScriptSleep(int delay) 136 protected virtual void ScriptSleep(int delay)
144 { 137 {
145 delay = (int)((float)delay * m_ScriptDelayFactor); 138 delay = (int)((float)delay * m_ScriptDelayFactor);
@@ -1682,7 +1675,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1682 { 1675 {
1683 m_host.AddScriptLPS(1); 1676 m_host.AddScriptLPS(1);
1684 SetTexture(m_host, texture, face); 1677 SetTexture(m_host, texture, face);
1685 ConditionalScriptSleep(200); 1678 ScriptSleep(200);
1686 } 1679 }
1687 1680
1688 public void llSetLinkTexture(int linknumber, string texture, int face) 1681 public void llSetLinkTexture(int linknumber, string texture, int face)
@@ -1694,7 +1687,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1694 foreach (SceneObjectPart part in parts) 1687 foreach (SceneObjectPart part in parts)
1695 SetTexture(part, texture, face); 1688 SetTexture(part, texture, face);
1696 1689
1697 ConditionalScriptSleep(200); 1690 ScriptSleep(200);
1698 } 1691 }
1699 1692
1700 protected void SetTexture(SceneObjectPart part, string texture, int face) 1693 protected void SetTexture(SceneObjectPart part, string texture, int face)
@@ -1739,7 +1732,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1739 m_host.AddScriptLPS(1); 1732 m_host.AddScriptLPS(1);
1740 1733
1741 ScaleTexture(m_host, u, v, face); 1734 ScaleTexture(m_host, u, v, face);
1742 ConditionalScriptSleep(200); 1735 ScriptSleep(200);
1743 } 1736 }
1744 1737
1745 protected void ScaleTexture(SceneObjectPart part, double u, double v, int face) 1738 protected void ScaleTexture(SceneObjectPart part, double u, double v, int face)
@@ -1775,7 +1768,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1775 { 1768 {
1776 m_host.AddScriptLPS(1); 1769 m_host.AddScriptLPS(1);
1777 OffsetTexture(m_host, u, v, face); 1770 OffsetTexture(m_host, u, v, face);
1778 ConditionalScriptSleep(200); 1771 ScriptSleep(200);
1779 } 1772 }
1780 1773
1781 protected void OffsetTexture(SceneObjectPart part, double u, double v, int face) 1774 protected void OffsetTexture(SceneObjectPart part, double u, double v, int face)
@@ -1811,7 +1804,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1811 { 1804 {
1812 m_host.AddScriptLPS(1); 1805 m_host.AddScriptLPS(1);
1813 RotateTexture(m_host, rotation, face); 1806 RotateTexture(m_host, rotation, face);
1814 ConditionalScriptSleep(200); 1807 ScriptSleep(200);
1815 } 1808 }
1816 1809
1817 protected void RotateTexture(SceneObjectPart part, double rotation, int face) 1810 protected void RotateTexture(SceneObjectPart part, double rotation, int face)
@@ -2283,7 +2276,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2283 { 2276 {
2284 m_host.AddScriptLPS(1); 2277 m_host.AddScriptLPS(1);
2285 m_host.PreloadSound(sound); 2278 m_host.PreloadSound(sound);
2286 ConditionalScriptSleep(1000); 2279 ScriptSleep(1000);
2287 } 2280 }
2288 2281
2289 /// <summary> 2282 /// <summary>
@@ -2575,28 +2568,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2575 { 2568 {
2576 m_host.AddScriptLPS(1); 2569 m_host.AddScriptLPS(1);
2577 Deprecated("llMakeExplosion"); 2570 Deprecated("llMakeExplosion");
2578 ConditionalScriptSleep(100); 2571 ScriptSleep(100);
2579 } 2572 }
2580 2573
2581 public void llMakeFountain(int particles, double scale, double vel, double lifetime, double arc, int bounce, string texture, LSL_Vector offset, double bounce_offset) 2574 public void llMakeFountain(int particles, double scale, double vel, double lifetime, double arc, int bounce, string texture, LSL_Vector offset, double bounce_offset)
2582 { 2575 {
2583 m_host.AddScriptLPS(1); 2576 m_host.AddScriptLPS(1);
2584 Deprecated("llMakeFountain"); 2577 Deprecated("llMakeFountain");
2585 ConditionalScriptSleep(100); 2578 ScriptSleep(100);
2586 } 2579 }
2587 2580
2588 public void llMakeSmoke(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) 2581 public void llMakeSmoke(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset)
2589 { 2582 {
2590 m_host.AddScriptLPS(1); 2583 m_host.AddScriptLPS(1);
2591 Deprecated("llMakeSmoke"); 2584 Deprecated("llMakeSmoke");
2592 ConditionalScriptSleep(100); 2585 ScriptSleep(100);
2593 } 2586 }
2594 2587
2595 public void llMakeFire(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) 2588 public void llMakeFire(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset)
2596 { 2589 {
2597 m_host.AddScriptLPS(1); 2590 m_host.AddScriptLPS(1);
2598 Deprecated("llMakeFire"); 2591 Deprecated("llMakeFire");
2599 ConditionalScriptSleep(100); 2592 ScriptSleep(100);
2600 } 2593 }
2601 2594
2602 public void llRezAtRoot(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param) 2595 public void llRezAtRoot(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param)
@@ -2655,7 +2648,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2655 } 2648 }
2656 // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay) 2649 // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay)
2657 ScriptSleep((int)((groupmass * velmag) / 10)); 2650 ScriptSleep((int)((groupmass * velmag) / 10));
2658 ConditionalScriptSleep(100); 2651 ScriptSleep(100);
2659 return; 2652 return;
2660 } 2653 }
2661 } 2654 }
@@ -2941,7 +2934,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2941 } 2934 }
2942 2935
2943 emailModule.SendEmail(m_host.UUID, address, subject, message); 2936 emailModule.SendEmail(m_host.UUID, address, subject, message);
2944 ConditionalScriptSleep(20000); 2937 ScriptSleep(20000);
2945 } 2938 }
2946 2939
2947 public void llGetNextEmail(string address, string subject) 2940 public void llGetNextEmail(string address, string subject)
@@ -3745,7 +3738,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3745 // destination is an object 3738 // destination is an object
3746 World.MoveTaskInventoryItem(destId, m_host, objId); 3739 World.MoveTaskInventoryItem(destId, m_host, objId);
3747 } 3740 }
3748 ConditionalScriptSleep(3000); 3741 ScriptSleep(3000);
3749 } 3742 }
3750 3743
3751 public void llRemoveInventory(string name) 3744 public void llRemoveInventory(string name)
@@ -3846,7 +3839,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3846 AsyncCommands. 3839 AsyncCommands.
3847 DataserverPlugin.DataserverReply(rq.ToString(), reply); 3840 DataserverPlugin.DataserverReply(rq.ToString(), reply);
3848 3841
3849 ConditionalScriptSleep(100); 3842 ScriptSleep(100);
3850 return tid.ToString(); 3843 return tid.ToString();
3851 } 3844 }
3852 3845
@@ -3884,11 +3877,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3884 reply); 3877 reply);
3885 }); 3878 });
3886 3879
3887 ConditionalScriptSleep(1000); 3880 ScriptSleep(1000);
3888 return tid.ToString(); 3881 return tid.ToString();
3889 } 3882 }
3890 } 3883 }
3891 ConditionalScriptSleep(1000); 3884 ScriptSleep(1000);
3892 return String.Empty; 3885 return String.Empty;
3893 } 3886 }
3894 3887
@@ -3916,7 +3909,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3916 } 3909 }
3917 } 3910 }
3918 } 3911 }
3919 ConditionalScriptSleep(5000); 3912 ScriptSleep(5000);
3920 } 3913 }
3921 3914
3922 public void llTextBox(string avatar, string message, int chat_channel) 3915 public void llTextBox(string avatar, string message, int chat_channel)
@@ -5376,7 +5369,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5376 { 5369 {
5377 m_host.AddScriptLPS(1); 5370 m_host.AddScriptLPS(1);
5378 m_host.AdjustSoundGain(volume); 5371 m_host.AdjustSoundGain(volume);
5379 ConditionalScriptSleep(100); 5372 ScriptSleep(100);
5380 } 5373 }
5381 5374
5382 public void llSetSoundQueueing(int queue) 5375 public void llSetSoundQueueing(int queue)
@@ -5459,7 +5452,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5459 World.TeleportClientHome(agentId, presence.ControllingClient); 5452 World.TeleportClientHome(agentId, presence.ControllingClient);
5460 } 5453 }
5461 } 5454 }
5462 ConditionalScriptSleep(5000); 5455 ScriptSleep(5000);
5463 } 5456 }
5464 5457
5465 public LSL_List llParseString2List(string str, LSL_List separators, LSL_List in_spacers) 5458 public LSL_List llParseString2List(string str, LSL_List separators, LSL_List in_spacers)
@@ -6151,7 +6144,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6151 land.ParcelAccessList.Add(entry); 6144 land.ParcelAccessList.Add(entry);
6152 } 6145 }
6153 } 6146 }
6154 ConditionalScriptSleep(100); 6147 ScriptSleep(100);
6155 } 6148 }
6156 6149
6157 public void llSetTouchText(string text) 6150 public void llSetTouchText(string text)
@@ -6248,7 +6241,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6248 av, m_host.Name, m_host.UUID, m_host.OwnerID, 6241 av, m_host.Name, m_host.UUID, m_host.OwnerID,
6249 message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); 6242 message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts);
6250 6243
6251 ConditionalScriptSleep(1000); 6244 ScriptSleep(1000);
6252 } 6245 }
6253 6246
6254 public void llVolumeDetect(int detect) 6247 public void llVolumeDetect(int detect)
@@ -6273,7 +6266,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6273 m_host.AddScriptLPS(1); 6266 m_host.AddScriptLPS(1);
6274 // Report an error as it does in SL 6267 // Report an error as it does in SL
6275 ShoutError("Deprecated. Please use llRemoteLoadScriptPin instead."); 6268 ShoutError("Deprecated. Please use llRemoteLoadScriptPin instead.");
6276 ConditionalScriptSleep(3000); 6269 ScriptSleep(3000);
6277 } 6270 }
6278 6271
6279 public void llSetRemoteScriptAccessPin(int pin) 6272 public void llSetRemoteScriptAccessPin(int pin)
@@ -6359,14 +6352,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6359 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams("remote_data", resobj, 6352 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams("remote_data", resobj,
6360 new DetectParams[0])); 6353 new DetectParams[0]));
6361 } 6354 }
6362 ConditionalScriptSleep(1000); 6355 ScriptSleep(1000);
6363 } 6356 }
6364 6357
6365 public LSL_String llSendRemoteData(string channel, string dest, int idata, string sdata) 6358 public LSL_String llSendRemoteData(string channel, string dest, int idata, string sdata)
6366 { 6359 {
6367 m_host.AddScriptLPS(1); 6360 m_host.AddScriptLPS(1);
6368 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 6361 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
6369 ConditionalScriptSleep(3000); 6362 ScriptSleep(3000);
6370 return (xmlrpcMod.SendRemoteData(m_localID, m_itemID, channel, dest, idata, sdata)).ToString(); 6363 return (xmlrpcMod.SendRemoteData(m_localID, m_itemID, channel, dest, idata, sdata)).ToString();
6371 } 6364 }
6372 6365
@@ -6375,7 +6368,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6375 m_host.AddScriptLPS(1); 6368 m_host.AddScriptLPS(1);
6376 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 6369 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
6377 xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); 6370 xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata);
6378 ConditionalScriptSleep(3000); 6371 ScriptSleep(3000);
6379 } 6372 }
6380 6373
6381 public void llCloseRemoteDataChannel(string channel) 6374 public void llCloseRemoteDataChannel(string channel)
@@ -6383,7 +6376,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6383 m_host.AddScriptLPS(1); 6376 m_host.AddScriptLPS(1);
6384 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 6377 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
6385 xmlrpcMod.CloseXMLRPCChannel((UUID)channel); 6378 xmlrpcMod.CloseXMLRPCChannel((UUID)channel);
6386 ConditionalScriptSleep(1000); 6379 ScriptSleep(1000);
6387 } 6380 }
6388 6381
6389 public LSL_String llMD5String(string src, int nonce) 6382 public LSL_String llMD5String(string src, int nonce)
@@ -7114,7 +7107,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7114 { 7107 {
7115 m_host.AddScriptLPS(1); 7108 m_host.AddScriptLPS(1);
7116 Deprecated("llXorBase64Strings"); 7109 Deprecated("llXorBase64Strings");
7117 ConditionalScriptSleep(300); 7110 ScriptSleep(300);
7118 return String.Empty; 7111 return String.Empty;
7119 } 7112 }
7120 7113
@@ -7162,7 +7155,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7162 7155
7163 land.SetMusicUrl(url); 7156 land.SetMusicUrl(url);
7164 7157
7165 ConditionalScriptSleep(2000); 7158 ScriptSleep(2000);
7166 } 7159 }
7167 7160
7168 public LSL_Vector llGetRootPosition() 7161 public LSL_Vector llGetRootPosition()
@@ -8207,7 +8200,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8207 case 5: // DATA_SIM_POS 8200 case 5: // DATA_SIM_POS
8208 if (info == null) 8201 if (info == null)
8209 { 8202 {
8210 ConditionalScriptSleep(1000); 8203 ScriptSleep(1000);
8211 return UUID.Zero.ToString(); 8204 return UUID.Zero.ToString();
8212 } 8205 }
8213 reply = new LSL_Vector( 8206 reply = new LSL_Vector(
@@ -8224,7 +8217,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8224 case 7: // DATA_SIM_RATING 8217 case 7: // DATA_SIM_RATING
8225 if (info == null) 8218 if (info == null)
8226 { 8219 {
8227 ConditionalScriptSleep(1000); 8220 ScriptSleep(1000);
8228 return UUID.Zero.ToString(); 8221 return UUID.Zero.ToString();
8229 } 8222 }
8230 int access = info.Maturity; 8223 int access = info.Maturity;
@@ -8243,7 +8236,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8243 reply = "OpenSim"; 8236 reply = "OpenSim";
8244 break; 8237 break;
8245 default: 8238 default:
8246 ConditionalScriptSleep(1000); 8239 ScriptSleep(1000);
8247 return UUID.Zero.ToString(); // Raise no event 8240 return UUID.Zero.ToString(); // Raise no event
8248 } 8241 }
8249 UUID rq = UUID.Random(); 8242 UUID rq = UUID.Random();
@@ -8254,7 +8247,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8254 AsyncCommands. 8247 AsyncCommands.
8255 DataserverPlugin.DataserverReply(rq.ToString(), reply); 8248 DataserverPlugin.DataserverReply(rq.ToString(), reply);
8256 8249
8257 ConditionalScriptSleep(1000); 8250 ScriptSleep(1000);
8258 return tid.ToString(); 8251 return tid.ToString();
8259 } 8252 }
8260 catch(Exception) 8253 catch(Exception)
@@ -8398,7 +8391,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8398 dm.SendUrlToUser( 8391 dm.SendUrlToUser(
8399 new UUID(avatar_id), m_host.Name, m_host.UUID, m_host.OwnerID, false, message, url); 8392 new UUID(avatar_id), m_host.Name, m_host.UUID, m_host.OwnerID, false, message, url);
8400 8393
8401 ConditionalScriptSleep(10000); 8394 ScriptSleep(10000);
8402 } 8395 }
8403 8396
8404 public void llParcelMediaCommandList(LSL_List commandList) 8397 public void llParcelMediaCommandList(LSL_List commandList)
@@ -8634,7 +8627,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8634 time); 8627 time);
8635 } 8628 }
8636 } 8629 }
8637 ConditionalScriptSleep(2000); 8630 ScriptSleep(2000);
8638 } 8631 }
8639 8632
8640 public LSL_List llParcelMediaQuery(LSL_List aList) 8633 public LSL_List llParcelMediaQuery(LSL_List aList)
@@ -8672,7 +8665,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8672 8665
8673 } 8666 }
8674 } 8667 }
8675 ConditionalScriptSleep(2000); 8668 ScriptSleep(2000);
8676 return list; 8669 return list;
8677 } 8670 }
8678 8671
@@ -8681,7 +8674,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8681 m_host.AddScriptLPS(1); 8674 m_host.AddScriptLPS(1);
8682 Int64 tmp = 0; 8675 Int64 tmp = 0;
8683 Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp); 8676 Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp);
8684 ConditionalScriptSleep(1000); 8677 ScriptSleep(1000);
8685 return Convert.ToInt32(tmp); 8678 return Convert.ToInt32(tmp);
8686 } 8679 }
8687 8680
@@ -8785,7 +8778,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8785 public void llSetPrimURL(string url) 8778 public void llSetPrimURL(string url)
8786 { 8779 {
8787 m_host.AddScriptLPS(1); 8780 m_host.AddScriptLPS(1);
8788 ConditionalScriptSleep(2000); 8781 ScriptSleep(2000);
8789 } 8782 }
8790 8783
8791 /// <summary> 8784 /// <summary>
@@ -8796,7 +8789,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8796 { 8789 {
8797 m_host.AddScriptLPS(1); 8790 m_host.AddScriptLPS(1);
8798 ShoutError("llRefreshPrimURL - not yet supported"); 8791 ShoutError("llRefreshPrimURL - not yet supported");
8799 ConditionalScriptSleep(20000); 8792 ScriptSleep(20000);
8800 } 8793 }
8801 8794
8802 public LSL_String llEscapeURL(string url) 8795 public LSL_String llEscapeURL(string url)
@@ -8838,7 +8831,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8838 new Vector3((float)pos.x, (float)pos.y, (float)pos.z), 8831 new Vector3((float)pos.x, (float)pos.y, (float)pos.z),
8839 new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z)); 8832 new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z));
8840 } 8833 }
8841 ConditionalScriptSleep(1000); 8834 ScriptSleep(1000);
8842 } 8835 }
8843 8836
8844 public void llAddToLandBanList(string avatar, double hours) 8837 public void llAddToLandBanList(string avatar, double hours)
@@ -8857,7 +8850,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8857 land.ParcelAccessList.Add(entry); 8850 land.ParcelAccessList.Add(entry);
8858 } 8851 }
8859 } 8852 }
8860 ConditionalScriptSleep(100); 8853 ScriptSleep(100);
8861 } 8854 }
8862 8855
8863 public void llRemoveFromLandPassList(string avatar) 8856 public void llRemoveFromLandPassList(string avatar)
@@ -8879,7 +8872,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8879 } 8872 }
8880 } 8873 }
8881 } 8874 }
8882 ConditionalScriptSleep(100); 8875 ScriptSleep(100);
8883 } 8876 }
8884 8877
8885 public void llRemoveFromLandBanList(string avatar) 8878 public void llRemoveFromLandBanList(string avatar)
@@ -8901,7 +8894,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8901 } 8894 }
8902 } 8895 }
8903 } 8896 }
8904 ConditionalScriptSleep(100); 8897 ScriptSleep(100);
8905 } 8898 }
8906 8899
8907 public void llSetCameraParams(LSL_List rules) 8900 public void llSetCameraParams(LSL_List rules)
@@ -9163,7 +9156,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9163 } 9156 }
9164 } 9157 }
9165 } 9158 }
9166 ConditionalScriptSleep(100); 9159 ScriptSleep(100);
9167 } 9160 }
9168 9161
9169 public void llResetLandPassList() 9162 public void llResetLandPassList()
@@ -9180,7 +9173,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9180 } 9173 }
9181 } 9174 }
9182 } 9175 }
9183 ConditionalScriptSleep(100); 9176 ScriptSleep(100);
9184 } 9177 }
9185 9178
9186 public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) 9179 public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide)
@@ -9259,7 +9252,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9259 ret.Add(detectedParams.Value); 9252 ret.Add(detectedParams.Value);
9260 } 9253 }
9261 } 9254 }
9262 ConditionalScriptSleep(2000); 9255 ScriptSleep(2000);
9263 return ret; 9256 return ret;
9264 } 9257 }
9265 9258
@@ -9517,7 +9510,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9517 AsyncCommands. 9510 AsyncCommands.
9518 DataserverPlugin.DataserverReply(assetID.ToString(), 9511 DataserverPlugin.DataserverReply(assetID.ToString(),
9519 NotecardCache.GetLines(assetID).ToString()); 9512 NotecardCache.GetLines(assetID).ToString());
9520 ConditionalScriptSleep(100); 9513 ScriptSleep(100);
9521 return tid.ToString(); 9514 return tid.ToString();
9522 } 9515 }
9523 9516
@@ -9539,7 +9532,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9539 NotecardCache.GetLines(id).ToString()); 9532 NotecardCache.GetLines(id).ToString());
9540 }); 9533 });
9541 9534
9542 ConditionalScriptSleep(100); 9535 ScriptSleep(100);
9543 return tid.ToString(); 9536 return tid.ToString();
9544 } 9537 }
9545 9538
@@ -9578,7 +9571,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9578 { 9571 {
9579 AsyncCommands.DataserverPlugin.DataserverReply(assetID.ToString(), 9572 AsyncCommands.DataserverPlugin.DataserverReply(assetID.ToString(),
9580 NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax)); 9573 NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax));
9581 ConditionalScriptSleep(100); 9574 ScriptSleep(100);
9582 return tid.ToString(); 9575 return tid.ToString();
9583 } 9576 }
9584 9577
@@ -9599,7 +9592,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9599 NotecardCache.GetLine(id, line, m_notecardLineReadCharsMax)); 9592 NotecardCache.GetLine(id, line, m_notecardLineReadCharsMax));
9600 }); 9593 });
9601 9594
9602 ConditionalScriptSleep(100); 9595 ScriptSleep(100);
9603 return tid.ToString(); 9596 return tid.ToString();
9604 } 9597 }
9605 } 9598 }
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index 35b08f9..79d57d2 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -39,7 +39,7 @@
39 ; Sets the method that OpenSim will use to fire asynchronous 39 ; Sets the method that OpenSim will use to fire asynchronous
40 ; events. Valid values are UnsafeQueueUserWorkItem, 40 ; events. Valid values are UnsafeQueueUserWorkItem,
41 ; QueueUserWorkItem, BeginInvoke, SmartThreadPool, and Thread 41 ; QueueUserWorkItem, BeginInvoke, SmartThreadPool, and Thread
42 async_call_method = UnsafeQueueUserWorkItem 42 ; async_call_method = SmartThreadPool
43 43
44 ; ## 44 ; ##
45 ; ## CLIENTS 45 ; ## CLIENTS
@@ -51,6 +51,9 @@
51 ; Set this to the DLL containing the client stack to use. 51 ; Set this to the DLL containing the client stack to use.
52 clientstack_plugin="OpenSim.Region.ClientStack.LindenUDP.dll" 52 clientstack_plugin="OpenSim.Region.ClientStack.LindenUDP.dll"
53 53
54 ; Max threads to allocate on the FireAndForget pool
55 MaxPoolThreads = 15
56
54 ; ## 57 ; ##
55 ; ## REGIONS 58 ; ## REGIONS
56 ; ## 59 ; ##
diff --git a/prebuild.xml b/prebuild.xml
index e17da9a..81f907d 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -117,6 +117,28 @@
117 </Files> 117 </Files>
118 </Project> 118 </Project>
119 119
120 <Project frameworkVersion="v3_5" name="SmartThreadPool" path="ThirdParty/SmartThreadPool" type="Library">
121 <Configuration name="Debug">
122 <Options>
123 <OutputPath>../../bin/</OutputPath>
124 </Options>
125 </Configuration>
126 <Configuration name="Release">
127 <Options>
128 <OutputPath>../../bin/</OutputPath>
129 </Options>
130 </Configuration>
131
132 <ReferencePath>../../bin/</ReferencePath>
133 <Reference name="System"/>
134 <Reference name="System.Xml"/>
135 <Reference name="System.Data"/>
136 <Reference name="System.Web"/>
137 <Files>
138 <Match pattern="*.cs" recurse="false"/>
139 </Files>
140 </Project>
141
120 <Project frameworkVersion="v3_5" name="OpenSim.Framework" path="OpenSim/Framework" type="Library"> 142 <Project frameworkVersion="v3_5" name="OpenSim.Framework" path="OpenSim/Framework" type="Library">
121 <Configuration name="Debug"> 143 <Configuration name="Debug">
122 <Options> 144 <Options>
@@ -145,6 +167,7 @@
145 <Reference name="Nini.dll" /> 167 <Reference name="Nini.dll" />
146 <Reference name="log4net.dll"/> 168 <Reference name="log4net.dll"/>
147 <Reference name="Mono.Addins.dll" /> 169 <Reference name="Mono.Addins.dll" />
170 <Reference name="SmartThreadPool" />
148 <Files> 171 <Files>
149 <Match pattern="*.cs" recurse="false"/> 172 <Match pattern="*.cs" recurse="false"/>
150 <Match path="Client" pattern="*.cs" recurse="true"/> 173 <Match path="Client" pattern="*.cs" recurse="true"/>
@@ -2387,28 +2410,6 @@
2387 </Files> 2410 </Files>
2388 </Project> 2411 </Project>
2389 2412
2390 <Project frameworkVersion="v3_5" name="SmartThreadPool" path="ThirdParty/SmartThreadPool" type="Library">
2391 <Configuration name="Debug">
2392 <Options>
2393 <OutputPath>../../bin/</OutputPath>
2394 </Options>
2395 </Configuration>
2396 <Configuration name="Release">
2397 <Options>
2398 <OutputPath>../../bin/</OutputPath>
2399 </Options>
2400 </Configuration>
2401
2402 <ReferencePath>../../bin/</ReferencePath>
2403 <Reference name="System"/>
2404 <Reference name="System.Xml"/>
2405 <Reference name="System.Data"/>
2406 <Reference name="System.Web"/>
2407 <Files>
2408 <Match pattern="*.cs" recurse="false"/>
2409 </Files>
2410 </Project>
2411
2412 <Project frameworkVersion="v3_5" name="OpenSim.Region.ScriptEngine.Shared" path="OpenSim/Region/ScriptEngine/Shared" type="Library"> 2413 <Project frameworkVersion="v3_5" name="OpenSim.Region.ScriptEngine.Shared" path="OpenSim/Region/ScriptEngine/Shared" type="Library">
2413 <Configuration name="Debug"> 2414 <Configuration name="Debug">
2414 <Options> 2415 <Options>