aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorMelanie2013-02-07 01:40:11 +0000
committerMelanie2013-02-07 01:40:11 +0000
commit375114bea37a017af553595d3a6f9d269acac1c5 (patch)
tree41cdd67221bc0b1af5e6bd886338a0e90d2c856e /OpenSim/Framework
parentMerge branch 'master' into careminster (diff)
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-375114bea37a017af553595d3a6f9d269acac1c5.zip
opensim-SC_OLD-375114bea37a017af553595d3a6f9d269acac1c5.tar.gz
opensim-SC_OLD-375114bea37a017af553595d3a6f9d269acac1c5.tar.bz2
opensim-SC_OLD-375114bea37a017af553595d3a6f9d269acac1c5.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/DAMap.cs15
-rw-r--r--OpenSim/Framework/Util.cs16
2 files changed, 29 insertions, 2 deletions
diff --git a/OpenSim/Framework/DAMap.cs b/OpenSim/Framework/DAMap.cs
index 291c8b8..64cea77 100644
--- a/OpenSim/Framework/DAMap.cs
+++ b/OpenSim/Framework/DAMap.cs
@@ -73,6 +73,14 @@ namespace OpenSim.Framework
73 m_map = (OSDMap)OSDParser.DeserializeLLSDXml(rawXml); 73 m_map = (OSDMap)OSDParser.DeserializeLLSDXml(rawXml);
74 } 74 }
75 75
76 // WARNING: this is temporary for experimentation only, it will be removed!!!!
77 public OSDMap TopLevelMap
78 {
79 get { return m_map; }
80 set { m_map = value; }
81 }
82
83
76 public void ReadXml(XmlReader reader) 84 public void ReadXml(XmlReader reader)
77 { 85 {
78 ReadXml(reader.ReadInnerXml()); 86 ReadXml(reader.ReadInnerXml());
@@ -168,6 +176,10 @@ namespace OpenSim.Framework
168 } 176 }
169 } 177 }
170 178
179 /// <summary>
180 /// Validate the key used for storing separate data stores.
181 /// </summary>
182 /// <param name='key'></param>
171 private static void ValidateKey(string key) 183 private static void ValidateKey(string key)
172 { 184 {
173 if (key.Length < MIN_STORE_NAME_LENGTH) 185 if (key.Length < MIN_STORE_NAME_LENGTH)
@@ -188,7 +200,8 @@ namespace OpenSim.Framework
188 } 200 }
189 201
190 public void Add(KeyValuePair<string, OSDMap> kvp) 202 public void Add(KeyValuePair<string, OSDMap> kvp)
191 { 203 {
204 ValidateKey(kvp.Key);
192 lock (this) 205 lock (this)
193 m_map.Add(kvp.Key, kvp.Value); 206 m_map.Add(kvp.Key, kvp.Value);
194 } 207 }
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index e0d4d74..8e325d7 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -45,6 +45,7 @@ using System.Text.RegularExpressions;
45using System.Xml; 45using System.Xml;
46using System.Threading; 46using System.Threading;
47using log4net; 47using log4net;
48using log4net.Appender;
48using Nini.Config; 49using Nini.Config;
49using Nwc.XmlRpc; 50using Nwc.XmlRpc;
50using OpenMetaverse; 51using OpenMetaverse;
@@ -828,9 +829,22 @@ namespace OpenSim.Framework
828 return "."; 829 return ".";
829 } 830 }
830 831
832 public static string logFile()
833 {
834 foreach (IAppender appender in LogManager.GetRepository().GetAppenders())
835 {
836 if (appender is FileAppender)
837 {
838 return ((FileAppender)appender).File;
839 }
840 }
841
842 return "./OpenSim.log";
843 }
844
831 public static string logDir() 845 public static string logDir()
832 { 846 {
833 return "."; 847 return Path.GetDirectoryName(logFile());
834 } 848 }
835 849
836 // From: http://coercedcode.blogspot.com/2008/03/c-generate-unique-filenames-within.html 850 // From: http://coercedcode.blogspot.com/2008/03/c-generate-unique-filenames-within.html