aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 7215086..2fc7adc 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;
@@ -1186,6 +1186,33 @@ namespace OpenSim.Framework
1186 return null; 1186 return null;
1187 } 1187 }
1188 1188
1189 public static OSDMap GetOSDMap(string data)
1190 {
1191 OSDMap args = null;
1192 try
1193 {
1194 OSD buffer;
1195 // We should pay attention to the content-type, but let's assume we know it's Json
1196 buffer = OSDParser.DeserializeJson(data);
1197 if (buffer.Type == OSDType.Map)
1198 {
1199 args = (OSDMap)buffer;
1200 return args;
1201 }
1202 else
1203 {
1204 // uh?
1205 m_log.Debug(("[UTILS]: Got OSD of unexpected type " + buffer.Type.ToString()));
1206 return null;
1207 }
1208 }
1209 catch (Exception ex)
1210 {
1211 m_log.Debug("[UTILS]: exception on GetOSDMap " + ex.Message);
1212 return null;
1213 }
1214 }
1215
1189 public static string[] Glob(string path) 1216 public static string[] Glob(string path)
1190 { 1217 {
1191 string vol=String.Empty; 1218 string vol=String.Empty;