aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r--OpenSim/Framework/Util.cs29
1 files changed, 28 insertions, 1 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 48435cb..10af925 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -553,7 +553,7 @@ namespace OpenSim.Framework
553 } 553 }
554 catch (Exception e) 554 catch (Exception e)
555 { 555 {
556 m_log.ErrorFormat("[UTIL]: An error occurred while resolving {0}, {1}", dnsAddress, e); 556 m_log.WarnFormat("[UTIL]: An error occurred while resolving host name {0}, {1}", dnsAddress, e);
557 557
558 // Still going to throw the exception on for now, since this was what was happening in the first place 558 // Still going to throw the exception on for now, since this was what was happening in the first place
559 throw e; 559 throw e;
@@ -1192,6 +1192,33 @@ namespace OpenSim.Framework
1192 return null; 1192 return null;
1193 } 1193 }
1194 1194
1195 public static OSDMap GetOSDMap(string data)
1196 {
1197 OSDMap args = null;
1198 try
1199 {
1200 OSD buffer;
1201 // We should pay attention to the content-type, but let's assume we know it's Json
1202 buffer = OSDParser.DeserializeJson(data);
1203 if (buffer.Type == OSDType.Map)
1204 {
1205 args = (OSDMap)buffer;
1206 return args;
1207 }
1208 else
1209 {
1210 // uh?
1211 m_log.Debug(("[UTILS]: Got OSD of unexpected type " + buffer.Type.ToString()));
1212 return null;
1213 }
1214 }
1215 catch (Exception ex)
1216 {
1217 m_log.Debug("[UTILS]: exception on GetOSDMap " + ex.Message);
1218 return null;
1219 }
1220 }
1221
1195 public static string[] Glob(string path) 1222 public static string[] Glob(string path)
1196 { 1223 {
1197 string vol=String.Empty; 1224 string vol=String.Empty;