aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/ChildAgentDataUpdate.cs11
-rw-r--r--OpenSim/Framework/Console/CommandConsole.cs34
-rw-r--r--OpenSim/Framework/RegionInfo.cs1
-rw-r--r--OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs19
-rw-r--r--OpenSim/Framework/Util.cs5
5 files changed, 61 insertions, 9 deletions
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs
index 6d048f4..fe12874 100644
--- a/OpenSim/Framework/ChildAgentDataUpdate.cs
+++ b/OpenSim/Framework/ChildAgentDataUpdate.cs
@@ -308,6 +308,8 @@ namespace OpenSim.Framework
308 public Animation[] Anims; 308 public Animation[] Anims;
309 309
310 public UUID GranterID; 310 public UUID GranterID;
311 public UUID ParentPart;
312 public Vector3 SitOffset;
311 313
312 // Appearance 314 // Appearance
313 public AvatarAppearance Appearance; 315 public AvatarAppearance Appearance;
@@ -468,6 +470,10 @@ namespace OpenSim.Framework
468 } 470 }
469 args["attach_objects"] = attObjs; 471 args["attach_objects"] = attObjs;
470 } 472 }
473
474 args["parent_part"] = OSD.FromUUID(ParentPart);
475 args["sit_offset"] = OSD.FromString(SitOffset.ToString());
476
471 return args; 477 return args;
472 } 478 }
473 479
@@ -675,6 +681,11 @@ namespace OpenSim.Framework
675 } 681 }
676 } 682 }
677 } 683 }
684
685 if (args["parent_part"] != null)
686 ParentPart = args["parent_part"].AsUUID();
687 if (args["sit_offset"] != null)
688 Vector3.TryParse(args["sit_offset"].AsString(), out SitOffset);
678 } 689 }
679 690
680 public AgentData() 691 public AgentData()
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 c531e8a..7a3e67f 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -627,7 +627,6 @@ namespace OpenSim.Framework
627 627
628 foreach (String s in allKeys) 628 foreach (String s in allKeys)
629 { 629 {
630 string val = config.GetString(s);
631 SetOtherSetting(s, config.GetString(s)); 630 SetOtherSetting(s, config.GetString(s));
632 } 631 }
633 } 632 }
diff --git a/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs b/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs
index a392af6..c56f213 100644
--- a/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs
+++ b/OpenSim/Framework/Serialization/External/ExternalRepresentationUtils.cs
@@ -49,15 +49,16 @@ namespace OpenSim.Framework.Serialization.External
49 /// <param name="nodeToFill"></param> 49 /// <param name="nodeToFill"></param>
50 /// <param name="processors">/param> 50 /// <param name="processors">/param>
51 /// <param name="xtr"></param> 51 /// <param name="xtr"></param>
52 public static void ExecuteReadProcessors<NodeType>( 52 /// <returns>true on successful, false if there were any processing failures</returns>
53 public static bool ExecuteReadProcessors<NodeType>(
53 NodeType nodeToFill, Dictionary<string, Action<NodeType, XmlTextReader>> processors, XmlTextReader xtr) 54 NodeType nodeToFill, Dictionary<string, Action<NodeType, XmlTextReader>> processors, XmlTextReader xtr)
54 { 55 {
55 ExecuteReadProcessors( 56 return ExecuteReadProcessors(
56 nodeToFill, 57 nodeToFill,
57 processors, 58 processors,
58 xtr, 59 xtr,
59 (o, name, e) 60 (o, name, e)
60 => m_log.ErrorFormat( 61 => m_log.DebugFormat(
61 "[ExternalRepresentationUtils]: Exception while parsing element {0}, continuing. Exception {1}{2}", 62 "[ExternalRepresentationUtils]: Exception while parsing element {0}, continuing. Exception {1}{2}",
62 name, e.Message, e.StackTrace)); 63 name, e.Message, e.StackTrace));
63 } 64 }
@@ -71,12 +72,15 @@ namespace OpenSim.Framework.Serialization.External
71 /// <param name="parseExceptionAction"> 72 /// <param name="parseExceptionAction">
72 /// Action to take if there is a parsing problem. This will usually just be to log the exception 73 /// Action to take if there is a parsing problem. This will usually just be to log the exception
73 /// </param> 74 /// </param>
74 public static void ExecuteReadProcessors<NodeType>( 75 /// <returns>true on successful, false if there were any processing failures</returns>
76 public static bool ExecuteReadProcessors<NodeType>(
75 NodeType nodeToFill, 77 NodeType nodeToFill,
76 Dictionary<string, Action<NodeType, XmlTextReader>> processors, 78 Dictionary<string, Action<NodeType, XmlTextReader>> processors,
77 XmlTextReader xtr, 79 XmlTextReader xtr,
78 Action<NodeType, string, Exception> parseExceptionAction) 80 Action<NodeType, string, Exception> parseExceptionAction)
79 { 81 {
82 bool errors = false;
83
80 string nodeName = string.Empty; 84 string nodeName = string.Empty;
81 while (xtr.NodeType != XmlNodeType.EndElement) 85 while (xtr.NodeType != XmlNodeType.EndElement)
82 { 86 {
@@ -95,6 +99,7 @@ namespace OpenSim.Framework.Serialization.External
95 } 99 }
96 catch (Exception e) 100 catch (Exception e)
97 { 101 {
102 errors = true;
98 parseExceptionAction(nodeToFill, nodeName, e); 103 parseExceptionAction(nodeToFill, nodeName, e);
99 104
100 if (xtr.NodeType == XmlNodeType.EndElement) 105 if (xtr.NodeType == XmlNodeType.EndElement)
@@ -107,6 +112,8 @@ namespace OpenSim.Framework.Serialization.External
107 xtr.ReadOuterXml(); // ignore 112 xtr.ReadOuterXml(); // ignore
108 } 113 }
109 } 114 }
115
116 return errors;
110 } 117 }
111 118
112 /// <summary> 119 /// <summary>
@@ -140,6 +147,7 @@ namespace OpenSim.Framework.Serialization.External
140 UUID.TryParse(node.InnerText, out uuid); 147 UUID.TryParse(node.InnerText, out uuid);
141 creator = userService.GetUserAccount(scopeID, uuid); 148 creator = userService.GetUserAccount(scopeID, uuid);
142 } 149 }
150
143 if (node.Name == "CreatorData" && node.InnerText != null && node.InnerText != string.Empty) 151 if (node.Name == "CreatorData" && node.InnerText != null && node.InnerText != string.Empty)
144 hasCreatorData = true; 152 hasCreatorData = true;
145 153
@@ -163,7 +171,6 @@ namespace OpenSim.Framework.Serialization.External
163 doc.Save(wr); 171 doc.Save(wr);
164 return wr.ToString(); 172 return wr.ToString();
165 } 173 }
166
167 } 174 }
168 } 175 }
169} 176} \ No newline at end of file
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index fae6802..dd30c2f 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1676,13 +1676,14 @@ namespace OpenSim.Framework
1676 /// </summary> 1676 /// </summary>
1677 public static void PrintCallStack() 1677 public static void PrintCallStack()
1678 { 1678 {
1679 StackTrace stackTrace = new StackTrace(); // get call stack 1679 StackTrace stackTrace = new StackTrace(true); // get call stack
1680 StackFrame[] stackFrames = stackTrace.GetFrames(); // get method calls (frames) 1680 StackFrame[] stackFrames = stackTrace.GetFrames(); // get method calls (frames)
1681 1681
1682 // write call stack method names 1682 // write call stack method names
1683 foreach (StackFrame stackFrame in stackFrames) 1683 foreach (StackFrame stackFrame in stackFrames)
1684 { 1684 {
1685 m_log.Debug(stackFrame.GetMethod().DeclaringType + "." + stackFrame.GetMethod().Name); // write method name 1685 MethodBase mb = stackFrame.GetMethod();
1686 m_log.DebugFormat("{0}.{1}:{2}", mb.DeclaringType, mb.Name, stackFrame.GetFileLineNumber()); // write method name
1686 } 1687 }
1687 } 1688 }
1688 1689