aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Added assets service method AssetsExist(), which returns whether the given ↵Oren Hurvitz2014-04-021-0/+50
| | | | | | list of assets exist. This method is used to optimize sending assets with embedded assets: e.g., when a Hypergrid visitor takes an item into the inventory.
* - Increased the threadpool timeout to 10 minutesOren Hurvitz2014-03-261-1/+1
| | | | - Changed a few places that launch long-lasting threads to skip the timeout altogether
* Improved logging of HTTP requestsOren Hurvitz2014-03-251-0/+40
| | | | | | | | | | | - MemoryBuffer isn't seekable, so we can't log it. Log the string instead. - Handle compressed streams - Don't attempt to dump binary data. Either don't log it at all (if we know it's binary), or at least convert non-ASCII characters to ASCII. - Log responses to HTTP requests - Use the same log prefix for all of these log messages ("[LOGHTTP]"), to make them easy to see at a glance - Increased the snippet length to 200 (80 doesn't show enough), and add "..." only if the message was actually truncated Resolves http://opensimulator.org/mantis/view.php?id=6949
* Fixed unit tests due to changes in the threadpoolOren Hurvitz2014-03-251-8/+19
|
* Run slow operations in a separate thread, instead of using FireAndForget ↵Oren Hurvitz2014-03-251-0/+23
| | | | | | (which has a 1-minute timeout) Resolves http://opensimulator.org/mantis/view.php?id=6945
* Changed LogThreadPool to have 4 logging levels. Added console command "debug ↵Oren Hurvitz2014-03-251-19/+40
| | | | | | threadpool level" to set the logging level. Resolves http://opensimulator.org/mantis/view.php?id=6945
* Added a watchdog to abort slow threads in the main thread poolOren Hurvitz2014-03-251-11/+269
| | | | | | | | | | If a task in the thread pool hangs then it will permanently take up one of the threads. If this happens repeatedly then the thread pool will become exhausted and OpenSim will fail. This watchdog terminates threads in the thread pool that have been executing for over a minute (which probably means they're hung). Resolves http://opensimulator.org/mantis/view.php?id=6945
* LogThreadPool: when the thread is for ProcessPacketMethod, also log the ↵Oren Hurvitz2014-03-251-3/+12
| | | | | | packet type Resolves http://opensimulator.org/mantis/view.php?id=6945
* Refactored DebugFlagsEnumOren Hurvitz2014-03-251-5/+14
| | | | Resolves http://opensimulator.org/mantis/view.php?id=6945
* Automatically start logging FireAndForget activity if the threadpool is fullOren Hurvitz2014-03-251-4/+19
| | | | Resolves http://opensimulator.org/mantis/view.php?id=6945
* Added debug flag: LogThreadPool. It makes us log every use of the main ↵Oren Hurvitz2014-03-251-29/+114
| | | | | | threadpool. Resolves http://opensimulator.org/mantis/view.php?id=6945
* Refactored: ExternalRepresentationUtils should be the only place where the ↵Oren Hurvitz2014-03-241-2/+7
| | | | | | "CreatorData" field is calculated, to ensure uniformity Resolves http://opensimulator.org/mantis/view.php?id=6933
* Get the full viewer name even if it's (incorrectly) sent in the 'Channel' fieldOren Hurvitz2014-03-241-0/+32
| | | | | | Recent versions of Firestorm and Singularity have started sending the viewer name in the 'Channel' field, leaving only their version number in the 'Viewer' field. So we need to search both of these fields for the viewer name. This resolves http://opensimulator.org/mantis/view.php?id=6952
* Revert "Simplify DoubleQueue to eliminate redundant sempahore work."Justin Clark-Casey (justincc)2014-03-191-7/+27
| | | | | | This reverts commit 52b7b40034ddbb21d06b11ddc4eb6d766b0f616d. Got the semantics wrong - the sempahore is required so that the blocking thread waits for a signal.
* Simplify DoubleQueue to eliminate redundant sempahore work.Justin Clark-Casey (justincc)2014-03-191-27/+7
| | | | | Exclusion is already guaranteed by the lock on m_syncRoot. Semaphore could not allow more than one thread in these sections anyway since the underlying SDK structures are not thread-safe.
* Lock m_syncRoot on DoubleQueue.Count. This is not documented as a ↵Justin Clark-Casey (justincc)2014-03-181-1/+5
| | | | thread-safe operation
* Add Util method to load OpSys env varsDev Random2014-02-261-83/+87
|
* Log information about which function, request data and agent ID triggered an ↵Justin Clark-Casey (justincc)2014-02-141-0/+24
| | | | XmlRpcGroupsServiceConnector error
* Fix casting error for float type INI file parameter parsing.Robert Adams2014-01-191-1/+1
|
* Merge branch 'justincc-master'Justin Clark-Casey (justincc)2014-01-111-1/+3
|\
| * Allow Boolean nodes in XML to be specified as "0/1". AuroraSim does that.Oren Hurvitz2014-01-111-1/+3
| |
* | Add routines in Util.cs for conversion of region handles to regionRobert Adams2014-01-041-0/+43
|/ | | | | | locations and for the conversion of region world location to region 'region' location. These routines will replace all the arithmatic scattered throughout OpenSimulator.
* minor simplification of some unix date functions in Util. No functional change.Justin Clark-Casey (justincc)2013-09-031-5/+3
|
* Add experimental "show grid users online" console command to show grid users ↵Justin Clark-Casey (justincc)2013-09-031-4/+4
| | | | | | | | online from a standalone/robust instance. This is not guaranteed to be accurate since users may be left "online" in certain situations. For example, if a simulator crashes and they never login/logout again. To counter this somewhat, only users continuously online for less than 5 days are shown.
* Fixed error in BuildFakeParcelID() which was detected by regression tests.Kevin Cozens2013-08-081-2/+2
|
* Merge branch 'master' of git://opensimulator.org/git/opensimDan Lake2013-07-181-1/+1
|\
| * Fix what apepars to be a bug in DoubleQueue<T>.Enqueue(Queue<T> q, T data) ↵Justin Clark-Casey (justincc)2013-07-181-1/+1
| | | | | | | | | | | | where the q parmater is ignored and everyghig is always placed on m_lowQueue. No actual impact presently since nothing ends up calling EnqueueHigh()
* | Added MinPoolThreads to ini [Startup] section to control SmartThreadPool.Dan Lake2013-07-181-3/+5
|/
* This might address the following observed exception:Diva Canto2013-07-151-1/+1
| | | | | | | | | 17:14:28 - [APPLICATION]: APPLICATION EXCEPTION DETECTED: System.UnhandledExceptionEventArgs Exception: System.InvalidOperationException: Operation is not valid due to the current state of the object at System.Collections.Generic.Queue`1[OpenSim.Region.ClientStack.Linden.WebFetchInvDescModule+aPollRequest].Peek () [0x00011] in /root/install/mono-3.1.0/mono/mcs/class/System/System.Collections.Generic/Queue.cs:158 at System.Collections.Generic.Queue`1[OpenSim.Region.ClientStack.Linden.WebFetchInvDescModule+aPollRequest].Dequeue () [0x00000] in /root/install/mono-3.1.0/mono/mcs/class/System/System.Collections.Generic/Queue.cs:140 at OpenSim.Framework.DoubleQueue`1[OpenSim.Region.ClientStack.Linden.WebFetchInvDescModule+aPollRequest].Dequeue (TimeSpan wait, OpenSim.Region.ClientStack.Linden.aPollRequest& res) [0x0004e] in /home/avacon/opensim_2013-07-14/OpenSim/Framework/Util.cs:2297
* Fix regression where llHTTPRequests which did not get an OK response ↵Justin Clark-Casey (justincc)2013-07-111-1/+6
| | | | | | | | returned 499 and the exception message in the http_response event rather than the actual response code and body. This was a regression since commit 831e4c3 (Thu Apr 4 00:36:15 2013) This commit also adds a regression test for this case, though this currently only works with Mono This aims to address http://opensimulator.org/mantis/view.php?id=6704
* refactor: Move existing code to generate report information on the ↵Justin Clark-Casey (justincc)2013-06-171-63/+41
| | | | threadpool to the ServerBase rather than being in Util
* Fix bug where no threadpool data would be displayed in the "show threads" ↵Justin Clark-Casey (justincc)2013-06-171-1/+1
| | | | command if threadpool type was QueueUserWorkItem (Unsafe worked as expected)
* Port Avination's inventory send throttlingMelanie2013-06-051-0/+108
|
* To further help with tracking down the apperance of too much "Unknown User" ↵Justin Clark-Casey (justincc)2013-05-211-1/+1
| | | | | | | in chatlogs, etc. temporarily change each instance of this in OpenSimulator so we can identify where it's coming from For instance, the "Unknown User" in Util.ParseUniversalUserIdenitifer becaomes "Unknown UserUPUUI (class initials + method initials) This is to help with http://opensimulator.org/mantis/view.php?id=6625
* Update SmartThreadPool to latest version 2.2.3 with a major and minor change.Justin Clark-Casey (justincc)2013-05-011-10/+10
| | | | | | | | | | SmartThreadPool code comes from http://www.codeproject.com/Articles/7933/Smart-Thread-Pool This version implements thread abort (via WorkItem.Cancel(true)), threadpool naming, max thread stack, etc. so we no longer need to manually patch those. However, two changes have been made to stock 2.2.3. Major change: WorkItem.Cancel(bool abortExecution) in our version does not succeed if the work item was in progress and thread abort was not specified. This is to match previous behaviour where we handle co-operative termination via another mechanism rather than checking WorkItem.IsCanceled. Minor change: Did not add STP's StopWatch implementation as this is only used WinCE and Silverlight and causes a build clash with System.Diagnostics.StopWatch The reason for updating is to see if this improves http://opensimulator.org/mantis/view.php?id=6557 and http://opensimulator.org/mantis/view.php?id=6586
* Phase 1 of implementing a transfer permission. Overwrite libOMV's PermissionMaskMelanie2013-03-261-0/+15
| | | | with our own and add export permissions as well as a new definition for "All" as meaning "all conventional permissions" rather than "all possible permissions"
* minor: Remove some mono compiler warnings in OpenSim.Framework.dllJustin Clark-Casey (justincc)2013-03-131-1/+1
|
* Move map related settings from [Startup] to a new [Map] section in OpenSim.iniJustin Clark-Casey (justincc)2013-02-251-6/+21
| | | | | | | Existing map settings in [Startup] will continue to work, and if present will override anything in [Map] However, the proper place for such settings would now be [Map] This is to reduce the use of [Startup] as a bag for non-generic settings which should really go in sections, in common with other settings. This commit also extends Diva's previous work to allow a default setting to be given when looking at multiple sections for settings.
* Added new Util function for reading config vars that's more generic than the ↵Diva Canto2013-02-221-0/+38
| | | | one I added yesterday -- this is for helping move config vars out of [Startup]
* Simplification of HG configs: HomeURI and GatekeeperURI now are defined as ↵Diva Canto2013-02-211-1/+21
| | | | default under [Startup]. They can then be overwritten in the other sections (but probably shouldn't). I kept the existing code for backwards compatibility, so this should not cause any breaks from people's current configurations. But people should move to have these 2 vars under [Startup] -- see OpenSim.ini.example and Robust.HG.ini.example. And yes, both names now end with "URI" for consistency.
* WebStats will now use actual logfile as specified in OpenSim.exe.config ↵Dan Lake2013-02-061-1/+15
| | | | rather than hardcoded ./OpenSim.log. This allows for rotating logs and other file appender types
* Assign the SmartThreadPool name in the constructorOren Hurvitz2013-01-191-2/+7
| | | | This is required because some threads are created in the constructor, so assigning the name afterwards would be too late.
* Add utility function to clamp a vector to a maximum magnitude.Robert Adams2013-01-171-0/+12
|
* Allow registering regions whose names are equivalent under LIKE but not ↵Oren Hurvitz2013-01-021-0/+11
| | | | truly equal
* minor: Assign names to the different SmartThreadPools for debugging purposes.Justin Clark-Casey (justincc)2013-01-011-0/+1
| | | | | A different approach to the patch in http://opensimulator.org/mantis/view.php?id=6462 that doesn't involve further forking of SmartThreadPool
* refactor: call Util.InitThreadPool() if we are initializing an uninitialized ↵Justin Clark-Casey (justincc)2013-01-011-1/+1
| | | | | | pool on first use rather than constructing it ourselves. No functional change.
* Add helper routine Util.InRange()Robert Adams2012-12-221-0/+7
|
* Add stack dump function that takes an alternate printer outter. I've found ↵Robert Adams2012-12-161-1/+7
| | | | that log4net can be slowish so, if one is generating A LOT of debug output, alternate printers are better
* Make "show threads" and "thread abort" console commands available on all serversJustin Clark-Casey (justincc)2012-11-231-6/+10
|
* fixing poorly-formatted xml doc string for Util.IsInsideBoxSignpostMarv2012-10-291-1/+1
|