aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs (unfollow)
Commit message (Collapse)AuthorFilesLines
2010-04-16Fix http://opensimulator.org/mantis/view.php?id=4657 where ↵Justin Clark-Casey (justincc)1-1/+1
OpenSim.Grid.UserServer.exe fails on startup if no previous config probably appears to occur because mono 2.4.2.3 (and possibly later) erroneously returns a value of 0 for BufferWidth and BufferHeight in some circumstances
2010-03-06Bug fix: store correct position information upon logout. Fixes mantis #4608Diva Canto1-0/+18
2010-02-18Change handling of the SYSTEMIP constant to be more sane.Melanie1-6/+12
This will now choose the first network interface IP address, or the loopback interface if no external interfaces are found. It will log the IP address used as [NETWORK]: Using x.x.x.x for SYSTEMIP.
2010-01-30Changed an error message to w warning message.Diva Canto1-1/+1
2009-12-31More progress on both the Simulation service and the Login service. Both ↵Diva Canto1-0/+27
still unfinished.
2009-12-13* Implements OSSL function: osGetSimulatorMemory - returns the current ↵Adam Frisby1-0/+20
amount of memory allocated to the simulator process (Moderate Threat Level). * Cleans redundant information out of the Simulator Version. Versions now look like: "OpenSimulator 0.6.9(dev) Unix/Mono" * [Minor] additional log info for MySQLInventoryData
2009-12-01* Fix Inconsistent line ending style in UtilTeravus Ovares (Dan Olivares)1-24/+24
2009-11-29* Patch from Misterblue to fix Environment.TickCount for statistics ↵Teravus Ovares (Dan Olivares)1-1/+25
purposes. Resolves the wrap-around of the 32 bit uint. * Teravus moved the Environment methods to the Util class
2009-10-27Experimental test to rate limit the incoming packet handler and try to ↵John Hurliman1-0/+21
always leave a worker thread available for other tasks
2009-10-23* Change the way Util.FireAndForget() calls SmartThreadPool to avoid using a ↵John Hurliman1-1/+11
delegate (which STP appears to hold on to). This removes the slow leak I was seeing when using async_call_method=SmartThreadPool and stabilizes allocated memory for an idle OpenSim instance
2009-10-22Terrible typo in the previous commit!John Hurliman1-1/+1
2009-10-22* Added a check if Util.m_ThreadPool is null before trying to use it, and if ↵John Hurliman1-13/+7
so initialize it to sane defaults * Simplified the InitThreadPool() function
2009-10-22* Allow SmartThreadPool to be initialized without setting max stack size ↵John Hurliman1-5/+7
(like the original implementation) * Only initialize Util's SmartThreadPool if it is actually being used * No longer initializing Util's SmartThreadPool with a custom max stack size. From MSDN: "Avoid using this constructor overload. The default stack size used by the Thread(ThreadStart) constructor overload is the recommended stack size for threads."
2009-10-21* Changed the misc. methods calling ThreadPool.UnsafeQueueUserWorkItem() to ↵John Hurliman1-19/+51
Util.FireAndForget() * Changed Util.FireAndForget() to use any of five different methods set with async_call_method in the [Startup] section of OpenSim.ini. Look at the example config for possible values
2009-10-22Reduce the default pool threads to 15 (from 30) and the minimum from 5 to 2Melanie1-1/+1
2009-10-22Add MaxPoolThreads in startup to limit the size of the thread pool usedMelanie1-12/+22
for FireAndForget. This lets us limit concurrency to make OpenSim play nice
2009-10-19* Change Util.FireAndForget to use ThreadPool.UnsafeQueueUserWorkItem(). ↵John Hurliman1-8/+10
This avoids .NET remoting and a managed->unmanaged->managed jump. Overall, a night and day performance difference * Initialize the LLClientView prim full update queue to the number of prims in the scene for a big performance boost * Reordered some comparisons on hot code paths for a minor speed boost * Removed an unnecessary call to the expensive DateTime.Now function (if you *have* to get the current time as opposed to Environment.TickCount, always use DateTime.UtcNow) * Don't fire the queue empty callback for the Resend category * Run the outgoing packet handler thread loop for each client synchronously. It seems like more time was being spent doing the execution asynchronously, and it made deadlocks very difficult to track down * Rewrote some expensive math in LandObject.cs * Optimized EntityManager to only lock on operations that need locking, and use TryGetValue() where possible * Only update the attachment database when an object is attached or detached * Other small misc. performance improvements
2009-10-16Converted FireAndForget methods to use a singleton pattern to attempt to ↵John Hurliman1-2/+21
work around a Mono bug with nested delegates
2009-10-06* Try/catch around EndInvoke() when Util.FireAndForget() returns to catch ↵John Hurliman1-1/+3
exceptions thrown in the async method * Added packet stats handling to the new LLUDP implementation * Attempting to avoid a race condition when creating a new LLUDPClient
2009-10-06* Continued work on the new LLUDP implementation. Appears to be functioning, ↵John Hurliman1-0/+36
although not everything is reimplemented yet * Replaced logic in ThreadTracker with a call to System.Diagnostics that does the same thing * Added Util.StringToBytes256() and Util.StringToBytes1024() to clamp output at byte[256] and byte[1024], respectively * Fixed formatting for a MySQLAssetData error logging line
2009-10-02* Creates Util.UTF8 and switches some references of Encoding.UTF8 to ↵John Hurliman1-5/+7
Util.UTF8 (not all references were switched since not all OpenSim libraries reference OpenSim.Framework) * Shrinks the largest in-memory object, the LLRAW.HeightmapLookupValue struct (only used for exporting to LLRAW terrain files), to the minimum possible size. This seems to have the odd side effect of cutting the size of the two double[256,256] terrain objects in half. Possibly an alignment optimization?
2009-10-01Formatting cleanup.Jeff Ames1-3/+3
2009-09-26Moved all HG1 operations to HGGridConnector.cs and ↵Diva Canto1-0/+26
HypergridServerConnector.cs/HypergridServiceConnector.cs, away from Region.Communications and HGNetworkServersInfo. Fixed small bugs with hyperlinked regions' map positions.
2009-09-24* Minor commit, added two new math utility functions.Adam Frisby1-0/+33
2009-09-03Added Util.FireAndForget(), to replace leaking calls to Delegate.BeginInvoke()John Hurliman1-0/+22
2009-08-07Remove debugging output frm ini file loading. Make it collect matchingMelanie1-10/+8
files only from last path component.
2009-08-07Add extensive debug output to Util.GlobMelanie1-0/+9
2009-08-07Remove GetFullPath call from config includes, because it barfs in WindozeMelanie1-3/+0
2009-08-07Add a method to init the OSSL Api's m_LSL_Api member back to the OSSL ApiMelanie1-0/+3
2009-08-06Allow arbitrary wildcards in config includes. Things likeMelanie1-0/+51
Include-Modules = "addin-modules/*/config/*.ini" will now work. Adds Util.Glob, which will resolve a globbed path into a string list.
2009-06-10Formatting cleanup.Jeff Ames1-2/+2
2009-06-01Minor: Change OpenSim to OpenSimulator in older copyright headers and ↵Jeff Ames1-1/+1
LICENSE.txt.
2009-05-31Add copyright headers, formatting cleanup, ignore some generated files.Jeff Ames1-1/+1
2009-05-25One more utility. Not used yet.diva1-2/+22
2009-05-23* Fixes [irritating] edge case in Util.GetLocalHost which could return an ↵Adam Frisby1-0/+8
IPv6 address if no non-loopback IPv4 address can be found. * Restores internal IPv6 support to NetworkUtil.* * Fixes bad login unit tests.
2009-05-23* Adds new NetworkUtil class, contains methods for handling IP resolution ↵Adam Frisby1-0/+14
when located on the same subnet. (Eg, can be used to avoid NAT Loopback requirements if fully utilized.) * Adds a few new network-related methods to Util.
2009-05-12Thank you kindly, Patnad, for a patch that:Charles Krinke1-0/+24
This is to handle the changes in the v1.23 viewer of LL regarding the adult rating. With this patch a region can be changed to the adult rating from LL viewer v1.23 and above.
2009-04-28* Add preliminary code for resolving iar profile namesJustin Clarke Casey1-1/+0
* Not yet active
2009-04-14Adds session authentication upon NewUserConnections. Adds user key ↵diva1-0/+16
authentication (in safemode only) upon CreateChildAgents. All of this for Hypergrid users too. This addresses assorted spoofing vulnerabilities.
2009-04-04Remove some Mono warnings.Homer Horwitz1-1/+1
2009-04-01* Added NUnit tested utility function GetHashGuid() for future use.lbsa711-7/+30
* Did some aligning refactoring of the MD5 and SHA-1 functions.
2009-03-31* Refactored out and de-duplicated Base64ToString(string)lbsa711-7/+20
* Fixed minor typo
2009-03-03Refactoring of CreateCommsManagerPlugin.MW1-2/+1
Plus some general cleanup of a few other files (deleting excess blank lines etc)
2009-02-28Added check so Util.ReadSettingsFromIniFile doesn't try to set static fields.MW1-18/+21
2009-02-28Copied the Util.ReadSettingsFromIniFile method from the branch to trunk.MW1-0/+61
2009-02-23* Performance Changes:Adam Frisby1-0/+15
* Moves Entity Updates into a seperate thread, allowing for OpenSim to utilize a computers CPU more effectively in return for potentially greater user and prim capacity. * Removes an expensive Sqrt call performed during Update on each object. This should lower CPU requirements for high-prim regions with physics enabled. * MXP Changes: Centers the region around 0,0 for primitives instead of 128,128. Prim display should now look more correct for MXP viewers.
2009-02-22Mantis#3218. Thank you kindly, TLaukkan (Tommil) for a patch that:Charles Krinke1-4/+2
* Added log4net dependency to physxplugin in prebuild.xml. * Added missing m_log fields to classes. * Replaced Console.WriteLine with appropriate m_log.Xxxx * Tested that nant test target runs succesfully. * Tested that local opensim sandbox starts up without errors.
2009-02-17* Moved the nifty MySQLEstateData connectionstring password-stripper out ↵lbsa711-0/+20
into the Util project
2009-02-12* optimized usings.lbsa711-5/+5
2009-01-29Complete the implementation of llSHA1String.idb1-0/+11