aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-02-13 20:48:50 +0000
committerJustin Clark-Casey (justincc)2012-02-13 20:48:50 +0000
commit21393af631c743f0ee0094a20a9fa9f2aeb2e500 (patch)
treedd74990b038ca912b6a0fe42a8a3305f9e51c7f2 /OpenSim/Framework
parentOn object deserialization, go back to logging errors at DEBUG level rather th... (diff)
parentcorrect the default avatar_terminal_velocity value that I accidentally left i... (diff)
downloadopensim-SC_OLD-21393af631c743f0ee0094a20a9fa9f2aeb2e500.zip
opensim-SC_OLD-21393af631c743f0ee0094a20a9fa9f2aeb2e500.tar.gz
opensim-SC_OLD-21393af631c743f0ee0094a20a9fa9f2aeb2e500.tar.bz2
opensim-SC_OLD-21393af631c743f0ee0094a20a9fa9f2aeb2e500.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Console/CommandConsole.cs34
-rw-r--r--OpenSim/Framework/RegionInfo.cs1
-rw-r--r--OpenSim/Framework/Util.cs5
3 files changed, 37 insertions, 3 deletions
diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs
index a0d3541..0d6288b 100644
--- a/OpenSim/Framework/Console/CommandConsole.cs
+++ b/OpenSim/Framework/Console/CommandConsole.cs
@@ -31,6 +31,7 @@ using System.Collections.Generic;
31using System.Diagnostics; 31using System.Diagnostics;
32using System.Reflection; 32using System.Reflection;
33using System.Text; 33using System.Text;
34using System.Text.RegularExpressions;
34using System.Threading; 35using System.Threading;
35using log4net; 36using log4net;
36using OpenSim.Framework; 37using OpenSim.Framework;
@@ -531,6 +532,11 @@ namespace OpenSim.Framework.Console
531 532
532 public class Parser 533 public class Parser
533 { 534 {
535 // If an unquoted portion ends with an element matching this regex
536 // and the next element contains a space, then we have stripped
537 // embedded quotes that should not have been stripped
538 private static Regex optionRegex = new Regex("^--[a-zA-Z0-9-]+=$");
539
534 public static string[] Parse(string text) 540 public static string[] Parse(string text)
535 { 541 {
536 List<string> result = new List<string>(); 542 List<string> result = new List<string>();
@@ -544,10 +550,38 @@ namespace OpenSim.Framework.Console
544 if (index % 2 == 0) 550 if (index % 2 == 0)
545 { 551 {
546 string[] words = unquoted[index].Split(new char[] {' '}); 552 string[] words = unquoted[index].Split(new char[] {' '});
553
554 bool option = false;
547 foreach (string w in words) 555 foreach (string w in words)
548 { 556 {
549 if (w != String.Empty) 557 if (w != String.Empty)
558 {
559 if (optionRegex.Match(w) == Match.Empty)
560 option = false;
561 else
562 option = true;
550 result.Add(w); 563 result.Add(w);
564 }
565 }
566 // The last item matched the regex, put the quotes back
567 if (option)
568 {
569 // If the line ended with it, don't do anything
570 if (index < (unquoted.Length - 1))
571 {
572 // Get and remove the option name
573 string optionText = result[result.Count - 1];
574 result.RemoveAt(result.Count - 1);
575
576 // Add the quoted value back
577 optionText += "\"" + unquoted[index + 1] + "\"";
578
579 // Push the result into our return array
580 result.Add(optionText);
581
582 // Skip the already used value
583 index++;
584 }
551 } 585 }
552 } 586 }
553 else 587 else
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 661b457..5ba3863 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -625,7 +625,6 @@ namespace OpenSim.Framework
625 625
626 foreach (String s in allKeys) 626 foreach (String s in allKeys)
627 { 627 {
628 string val = config.GetString(s);
629 SetOtherSetting(s, config.GetString(s)); 628 SetOtherSetting(s, config.GetString(s));
630 } 629 }
631 } 630 }
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index ed92b2d..4b0b13c 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1664,13 +1664,14 @@ namespace OpenSim.Framework
1664 /// </summary> 1664 /// </summary>
1665 public static void PrintCallStack() 1665 public static void PrintCallStack()
1666 { 1666 {
1667 StackTrace stackTrace = new StackTrace(); // get call stack 1667 StackTrace stackTrace = new StackTrace(true); // get call stack
1668 StackFrame[] stackFrames = stackTrace.GetFrames(); // get method calls (frames) 1668 StackFrame[] stackFrames = stackTrace.GetFrames(); // get method calls (frames)
1669 1669
1670 // write call stack method names 1670 // write call stack method names
1671 foreach (StackFrame stackFrame in stackFrames) 1671 foreach (StackFrame stackFrame in stackFrames)
1672 { 1672 {
1673 m_log.Debug(stackFrame.GetMethod().DeclaringType + "." + stackFrame.GetMethod().Name); // write method name 1673 MethodBase mb = stackFrame.GetMethod();
1674 m_log.DebugFormat("{0}.{1}:{2}", mb.DeclaringType, mb.Name, stackFrame.GetFileLineNumber()); // write method name
1674 } 1675 }
1675 } 1676 }
1676 1677