aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs4
-rw-r--r--OpenSim/Framework/Communications/Capabilities/Caps.cs7
-rw-r--r--OpenSim/Framework/Util.cs36
3 files changed, 42 insertions, 5 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 3143437..b167682 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -341,7 +341,9 @@ namespace OpenSim.Framework.Communications.Cache
341 public List<InventoryItemBase> HandleFetchInventoryDescendentsCAPS(LLUUID agentID, LLUUID folderID, LLUUID ownerID, 341 public List<InventoryItemBase> HandleFetchInventoryDescendentsCAPS(LLUUID agentID, LLUUID folderID, LLUUID ownerID,
342 bool fetchFolders, bool fetchItems, int sortOrder) 342 bool fetchFolders, bool fetchItems, int sortOrder)
343 { 343 {
344 //m_log.DebugFormat("[INVENTORY CACHE]: Fetching folders/items from {0} for agent {1}", folderID, agentID); 344// m_log.DebugFormat(
345// "[INVENTORY CACHE]: Fetching folders ({0}), items ({1}) from {2} for agent {3}",
346// fetchFolders, fetchItems, folderID, agentID);
345 347
346 // XXX We're not handling sortOrder yet! 348 // XXX We're not handling sortOrder yet!
347 349
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs
index 8061e28..ad3d79d 100644
--- a/OpenSim/Framework/Communications/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs
@@ -269,8 +269,9 @@ namespace OpenSim.Framework.Communications.Capabilities
269 { 269 {
270 response = "<llsd><map><key>folders</key><array>" + response + "</array></map></llsd>"; 270 response = "<llsd><map><key>folders</key><array>" + response + "</array></map></llsd>";
271 } 271 }
272 272
273 //m_log.DebugFormat("[AGENT INVENTORY]: Replying to CAPS fetch inventory request {0}", response); 273 //m_log.DebugFormat("[AGENT INVENTORY]: Replying to CAPS fetch inventory request with following xml");
274 //m_log.Debug(Util.GetFormattedXml(response));
274 275
275 return response; 276 return response;
276 } 277 }
@@ -960,4 +961,4 @@ namespace OpenSim.Framework.Communications.Capabilities
960 } 961 }
961 } 962 }
962 } 963 }
963} \ No newline at end of file 964}
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 0943626..5577140 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -36,6 +36,7 @@ using System.Runtime.Serialization.Formatters.Binary;
36using System.Security.Cryptography; 36using System.Security.Cryptography;
37using System.Text; 37using System.Text;
38using System.Text.RegularExpressions; 38using System.Text.RegularExpressions;
39using System.Xml;
39using libsecondlife; 40using libsecondlife;
40using log4net; 41using log4net;
41using Nini.Config; 42using Nini.Config;
@@ -43,6 +44,9 @@ using Nwc.XmlRpc;
43 44
44namespace OpenSim.Framework 45namespace OpenSim.Framework
45{ 46{
47 /// <summary>
48 /// Miscellaneous utility functions
49 /// </summary>
46 public class Util 50 public class Util
47 { 51 {
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 52 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -161,6 +165,36 @@ namespace OpenSim.Framework
161 // (but those probably wont work anyway) 165 // (but those probably wont work anyway)
162 return file; 166 return file;
163 } 167 }
168
169 /// <summary>
170 /// Debug utility function to convert unbroken strings of XML into something human readable for occasional debugging purposes.
171 ///
172 /// Please don't delete me even if I appear currently unused!
173 /// </summary>
174 /// <param name="rawXml"></param>
175 /// <returns></returns>
176 public static string GetFormattedXml(string rawXml)
177 {
178 XmlDocument xd = new XmlDocument();
179 xd.LoadXml(rawXml);
180
181 StringBuilder sb = new StringBuilder();
182 StringWriter sw = new StringWriter(sb);
183
184 XmlTextWriter xtw = new XmlTextWriter(sw);
185 xtw.Formatting = Formatting.Indented;
186
187 try
188 {
189 xd.WriteTo(xtw);
190 }
191 finally
192 {
193 xtw.Close();
194 }
195
196 return sb.ToString();
197 }
164 198
165 public static bool IsEnvironmentSupported(ref string reason) 199 public static bool IsEnvironmentSupported(ref string reason)
166 { 200 {
@@ -634,4 +668,4 @@ namespace OpenSim.Framework
634 return client.Send(url, 6000); 668 return client.Send(url, 6000);
635 } 669 }
636 } 670 }
637} \ No newline at end of file 671}