aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Add "show object pos <start-coord> to <end-coord>" command to simulator console.Justin Clark-Casey (justincc)2012-10-051-0/+13
| | | | | | This allows you to display details of all objects in a given bounding box. Values parts of the co-ord can be left out as appropriate (e.g. to get all objects between the ground and z=30. See "help show object pos" for more details.
* Add levels 4 and 5 to "debug http" console command that will log a sample of ↵Justin Clark-Casey (justincc)2012-09-111-0/+32
| | | | | | incoming request data and the entire incoming data respectively. See "help debug http" for more details.
* adding a clip method to handle Vector3 objects to enable a minor amount of ↵SignpostMarv2012-08-171-0/+6
| | | | refactoring
* Rather than instantiating a UTF8 encoding everywhere when we want to supress ↵Justin Clark-Casey (justincc)2012-07-131-0/+1
| | | | | | the BOM, use a single Util.UTF8NoBomEncoding. This class is thread-safe (as evidenced by the provision of the system-wide Encoding.UTF8 which does not suppress BOM on output).
* Where possible, use the system Encoding.ASCII and Encoding.UTF8 rather than ↵Justin Clark-Casey (justincc)2012-07-111-2/+1
| | | | | | | constructing fresh copies. The encodings are thread-safe and already used in such a manner in other places. This isn't done where Byte Order Mark output is suppressed, since Encoding.UTF8 is constructed to output the BOM.
* Refix the fixed fix!Melanie2012-03-211-2037/+2037
|
* Fixed borkness with previous merge.Diva Canto2012-03-201-16/+1
|
* Line endingsDiva Canto2012-03-201-89/+89
|
* Merge branch 'master' of ssh://opensimulator.org/var/git/opensimDiva Canto2012-03-201-61/+89
|\ | | | | | | | | Conflicts: OpenSim/Framework/Util.cs
| * Move frame loop entirely within Scene.Update() for better future performance ↵Justin Clark-Casey (justincc)2012-03-201-2/+15
| | | | | | | | | | | | | | | | analysis and stat accuracy. Update() now accepts a frames parameter which can control the number of frames updated. -1 will update until shutdown. The watchdog updating moves above the maintc recalculation for any required sleep since it should be accounted for within the frame.
* | HG Friends: allow the establishment of HG friendships without requiring ↵Diva Canto2012-03-201-1954/+1988
|/ | | | co-presence in the same sim. Using avatar picker, users can now search for names such as "first.last@grid.com:9000", find them, and request friendship. Friendship requests are stored if target user is offline. TESTED ON STANDALONE ONLY.
* Improve threadpool reporting to "show threads" console command (also gets ↵Justin Clark-Casey (justincc)2012-03-161-1/+55
| | | | printed out periodically)
* Add process working memory to "show stats" memory statistics.Justin Clark-Casey (justincc)2012-03-161-2/+5
| | | | This shows the actual amount of RAM being taken up by OpenSimulator (objects + vm overhead)
* Add 64 bit Windows sqlite3.dll and use this if running a 64-bit windows process.Justin Clark-Casey (justincc)2012-02-211-0/+30
|
* On Windows automatically load the correct native ODE library depending on ↵Justin Clark-Casey (justincc)2012-02-181-1/+37
| | | | | | | | | whether the process is 32-bit or 64-bit In theory, this means that a 64-bit Windows OS user can now run OpenSim.exe with ODE and use more than 2 (or 3) GB of memory. However, this is completely untested since I don't currently own a 64-bit Windows box. Feedback appreciated. Using OpenSim.32BitLaunch.exe should continue to work. Other platforms are unaffected. This will currently not work with sqlite - I will add that too if this works.
* Add line numbers to Util.PrintCallStack()Justin Clark-Casey (justincc)2012-02-101-2/+3
|
* Reactivate BasicCircuitTests.TestAddClient()Justin Clark-Casey (justincc)2011-12-081-16/+29
| | | | This checks that the initial UseCircuitCode packet is handled correctly for a normal client login.
* Get UUIDGatherer to scan notecards in the graph for asset uuids.Justin Clark-Casey (justincc)2011-10-221-3/+4
| | | | | This is to support npc baked texture saving in oars and iars. May address http://opensimulator.org/mantis/view.php?id=5743
* In an object return message, send a null-terminated empty string in binary ↵Justin Clark-Casey (justincc)2011-09-131-2/+40
| | | | | | | | | bucket to prevent a viewer 3 crash. This is the message sent to the client when the object is returned. We were sending byte[0] in the binary bucket. This didn't kill viewer 1 but did terminate viewer 3 (don't know about viewer 2). So sending "\0" instead. This is to address http://opensimulator.org/mantis/view.php?id=5683
* If a FireAndForget thread terminates with an exception, then catch and log ↵Justin Clark-Casey (justincc)2011-08-311-1/+15
| | | | | | rather than letting it terminate the simulator. Exceptions don't appear to do this with the SmartThreadPool but they do with UnsafeQueueUserWorkItem (and maybe others)
* Add new FireAndForgetMethod.None.Justin Clark-Casey (justincc)2011-08-161-1/+10
| | | | This executes the callback on the same thread that made the request. Designed for use only by regression tests that rely on a predicable event ordering.
* For all Util.FireAndForget invocations, set thread to en_US before ↵Justin Clark-Casey (justincc)2011-07-291-5/+10
| | | | | | | | | | continuing wtih the invocation. This is to avoid bugs where the locale is not manually set on the thread and bad data values get sent to the database or over the wire. Lots of code does this manually but as we've seen, a subtle change can hit code which has forgotton to do this. Since en_US show be used throughout the server at present, setting it at FireAndForget seems reasonable. Arguably, it would be better to do this where data is sent, but doing it here is much easier. All the manual BeginInvokes() remaining in the code should probably call FireAndForget instead.