aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
authorDiva Canto2010-03-06 08:21:54 -0800
committerDiva Canto2010-03-06 08:21:54 -0800
commitf4c165afe7003ad6276ad7d015fd1c9164a84328 (patch)
tree33274c973c23edee794964f1104fd60e02d82555 /OpenSim/Framework/Util.cs
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC-f4c165afe7003ad6276ad7d015fd1c9164a84328.zip
opensim-SC-f4c165afe7003ad6276ad7d015fd1c9164a84328.tar.gz
opensim-SC-f4c165afe7003ad6276ad7d015fd1c9164a84328.tar.bz2
opensim-SC-f4c165afe7003ad6276ad7d015fd1c9164a84328.tar.xz
Bug fix: store correct position information upon logout. Fixes mantis #4608
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r--OpenSim/Framework/Util.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 10af925..64f6118 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -29,6 +29,7 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Data; 31using System.Data;
32using System.Diagnostics;
32using System.Globalization; 33using System.Globalization;
33using System.IO; 34using System.IO;
34using System.IO.Compression; 35using System.IO.Compression;
@@ -1443,6 +1444,7 @@ namespace OpenSim.Framework
1443 } 1444 }
1444 1445
1445 #endregion FireAndForget Threading Pattern 1446 #endregion FireAndForget Threading Pattern
1447
1446 /// <summary> 1448 /// <summary>
1447 /// Environment.TickCount is an int but it counts all 32 bits so it goes positive 1449 /// Environment.TickCount is an int but it counts all 32 bits so it goes positive
1448 /// and negative every 24.9 days. This trims down TickCount so it doesn't wrap 1450 /// and negative every 24.9 days. This trims down TickCount so it doesn't wrap
@@ -1467,5 +1469,21 @@ namespace OpenSim.Framework
1467 Int32 diff = EnvironmentTickCount() - prevValue; 1469 Int32 diff = EnvironmentTickCount() - prevValue;
1468 return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1); 1470 return (diff >= 0) ? diff : (diff + EnvironmentTickCountMask + 1);
1469 } 1471 }
1472
1473 /// <summary>
1474 /// Prints the call stack at any given point. Useful for debugging.
1475 /// </summary>
1476 public static void PrintCallStack()
1477 {
1478 StackTrace stackTrace = new StackTrace(); // get call stack
1479 StackFrame[] stackFrames = stackTrace.GetFrames(); // get method calls (frames)
1480
1481 // write call stack method names
1482 foreach (StackFrame stackFrame in stackFrames)
1483 {
1484 m_log.Debug(stackFrame.GetMethod().DeclaringType + "." + stackFrame.GetMethod().Name); // write method name
1485 }
1486 }
1487
1470 } 1488 }
1471} 1489}