diff options
author | Kitto Flora | 2011-03-22 20:33:24 +0000 |
---|---|---|
committer | Kitto Flora | 2011-03-22 20:33:24 +0000 |
commit | 764e8c2a4371c24d1a0bd067c0bcbc806562064d (patch) | |
tree | 03dfb1bfe16c420fdbb6a1aa723c9203771d1beb /OpenSim/Framework/AgentCircuitData.cs | |
parent | Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff) | |
parent | Add some more fields to Estate settings and make them work. (diff) | |
download | opensim-SC-764e8c2a4371c24d1a0bd067c0bcbc806562064d.zip opensim-SC-764e8c2a4371c24d1a0bd067c0bcbc806562064d.tar.gz opensim-SC-764e8c2a4371c24d1a0bd067c0bcbc806562064d.tar.bz2 opensim-SC-764e8c2a4371c24d1a0bd067c0bcbc806562064d.tar.xz |
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Framework/AgentCircuitData.cs')
-rw-r--r-- | OpenSim/Framework/AgentCircuitData.cs | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs index 1600bdc..3dbc215 100644 --- a/OpenSim/Framework/AgentCircuitData.cs +++ b/OpenSim/Framework/AgentCircuitData.cs | |||
@@ -220,6 +220,8 @@ namespace OpenSim.Framework | |||
220 | args["packed_appearance"] = appmap; | 220 | args["packed_appearance"] = appmap; |
221 | } | 221 | } |
222 | 222 | ||
223 | // Old, bad way. Keeping it fow now for backwards compatibility | ||
224 | // OBSOLETE -- soon to be deleted | ||
223 | if (ServiceURLs != null && ServiceURLs.Count > 0) | 225 | if (ServiceURLs != null && ServiceURLs.Count > 0) |
224 | { | 226 | { |
225 | OSDArray urls = new OSDArray(ServiceURLs.Count * 2); | 227 | OSDArray urls = new OSDArray(ServiceURLs.Count * 2); |
@@ -232,6 +234,19 @@ namespace OpenSim.Framework | |||
232 | args["service_urls"] = urls; | 234 | args["service_urls"] = urls; |
233 | } | 235 | } |
234 | 236 | ||
237 | // again, this time the right way | ||
238 | if (ServiceURLs != null && ServiceURLs.Count > 0) | ||
239 | { | ||
240 | OSDMap urls = new OSDMap(); | ||
241 | foreach (KeyValuePair<string, object> kvp in ServiceURLs) | ||
242 | { | ||
243 | //System.Console.WriteLine("XXX " + kvp.Key + "=" + kvp.Value); | ||
244 | urls[kvp.Key] = OSD.FromString((kvp.Value == null) ? string.Empty : kvp.Value.ToString()); | ||
245 | } | ||
246 | args["serviceurls"] = urls; | ||
247 | } | ||
248 | |||
249 | |||
235 | return args; | 250 | return args; |
236 | } | 251 | } |
237 | 252 | ||
@@ -327,7 +342,20 @@ namespace OpenSim.Framework | |||
327 | } | 342 | } |
328 | 343 | ||
329 | ServiceURLs = new Dictionary<string, object>(); | 344 | ServiceURLs = new Dictionary<string, object>(); |
330 | if (args.ContainsKey("service_urls") && args["service_urls"] != null && (args["service_urls"]).Type == OSDType.Array) | 345 | // Try parse the new way, OSDMap |
346 | if (args.ContainsKey("serviceurls") && args["serviceurls"] != null && (args["serviceurls"]).Type == OSDType.Map) | ||
347 | { | ||
348 | OSDMap urls = (OSDMap)(args["serviceurls"]); | ||
349 | foreach (KeyValuePair<String, OSD> kvp in urls) | ||
350 | { | ||
351 | ServiceURLs[kvp.Key] = kvp.Value.AsString(); | ||
352 | //System.Console.WriteLine("XXX " + kvp.Key + "=" + ServiceURLs[kvp.Key]); | ||
353 | |||
354 | } | ||
355 | } | ||
356 | // else try the old way, OSDArray | ||
357 | // OBSOLETE -- soon to be deleted | ||
358 | else if (args.ContainsKey("service_urls") && args["service_urls"] != null && (args["service_urls"]).Type == OSDType.Array) | ||
331 | { | 359 | { |
332 | OSDArray urls = (OSDArray)(args["service_urls"]); | 360 | OSDArray urls = (OSDArray)(args["service_urls"]); |
333 | for (int i = 0; i < urls.Count / 2; i++) | 361 | for (int i = 0; i < urls.Count / 2; i++) |