diff options
author | UbitUmarov | 2019-08-02 04:28:34 +0100 |
---|---|---|
committer | UbitUmarov | 2019-08-02 04:28:34 +0100 |
commit | 482c51a42a300366c7b07faf4bf0c2258f274549 (patch) | |
tree | eae4f1d709652cf9ae6183f83b3d75d9d3d805c5 | |
parent | update libopenmetaverse including a ugly hack to try to workaround issues det... (diff) | |
download | opensim-SC-482c51a42a300366c7b07faf4bf0c2258f274549.zip opensim-SC-482c51a42a300366c7b07faf4bf0c2258f274549.tar.gz opensim-SC-482c51a42a300366c7b07faf4bf0c2258f274549.tar.bz2 opensim-SC-482c51a42a300366c7b07faf4bf0c2258f274549.tar.xz |
cosmetics
5 files changed, 22 insertions, 46 deletions
diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs index dcd5cc7..ebb00d2 100644 --- a/OpenSim/Framework/AgentCircuitData.cs +++ b/OpenSim/Framework/AgentCircuitData.cs | |||
@@ -374,8 +374,7 @@ namespace OpenSim.Framework | |||
374 | OSDMap urls = (OSDMap)tmpOSD; | 374 | OSDMap urls = (OSDMap)tmpOSD; |
375 | foreach (KeyValuePair<String, OSD> kvp in urls) | 375 | foreach (KeyValuePair<String, OSD> kvp in urls) |
376 | { | 376 | { |
377 | tmpOSD = kvp.Value; | 377 | ServiceURLs[kvp.Key] = kvp.Value; |
378 | ServiceURLs[kvp.Key] = tmpOSD.AsString(); | ||
379 | //System.Console.WriteLine("XXX " + kvp.Key + "=" + ServiceURLs[kvp.Key]); | 378 | //System.Console.WriteLine("XXX " + kvp.Key + "=" + ServiceURLs[kvp.Key]); |
380 | } | 379 | } |
381 | } | 380 | } |
@@ -394,6 +393,5 @@ namespace OpenSim.Framework | |||
394 | } | 393 | } |
395 | } | 394 | } |
396 | } | 395 | } |
397 | |||
398 | } | 396 | } |
399 | } | 397 | } |
diff --git a/OpenSim/Framework/WearableCacheItem.cs b/OpenSim/Framework/WearableCacheItem.cs index 84b9ee9..e060f22 100644 --- a/OpenSim/Framework/WearableCacheItem.cs +++ b/OpenSim/Framework/WearableCacheItem.cs | |||
@@ -161,20 +161,16 @@ namespace OpenSim.Framework | |||
161 | public static WearableCacheItem[] BakedFromOSD(OSD pInput) | 161 | public static WearableCacheItem[] BakedFromOSD(OSD pInput) |
162 | { | 162 | { |
163 | WearableCacheItem[] pcache = WearableCacheItem.GetDefaultCacheItem(); | 163 | WearableCacheItem[] pcache = WearableCacheItem.GetDefaultCacheItem(); |
164 | OSD tmpOSD; | ||
165 | if (pInput.Type == OSDType.Array) | 164 | if (pInput.Type == OSDType.Array) |
166 | { | 165 | { |
167 | OSDArray itemarray = (OSDArray)pInput; | 166 | OSDArray itemarray = (OSDArray)pInput; |
168 | foreach (OSDMap item in itemarray) | 167 | foreach (OSDMap item in itemarray) |
169 | { | 168 | { |
170 | tmpOSD = item["textureindex"]; | 169 | int idx = item["textureindex"].AsInteger(); |
171 | int idx = tmpOSD.AsInteger(); | ||
172 | if (idx < 0 || idx > pcache.Length) | 170 | if (idx < 0 || idx > pcache.Length) |
173 | continue; | 171 | continue; |
174 | tmpOSD = item["cacheid"]; | 172 | pcache[idx].CacheId = item["cacheid"].AsUUID(); |
175 | pcache[idx].CacheId = tmpOSD.AsUUID(); | 173 | pcache[idx].TextureID = item["textureid"].AsUUID(); |
176 | tmpOSD = item["textureid"]; | ||
177 | pcache[idx].TextureID = tmpOSD.AsUUID(); | ||
178 | /* | 174 | /* |
179 | if (item.ContainsKey("assetdata")) | 175 | if (item.ContainsKey("assetdata")) |
180 | { | 176 | { |
@@ -220,6 +216,4 @@ namespace OpenSim.Framework | |||
220 | return null; | 216 | return null; |
221 | } | 217 | } |
222 | } | 218 | } |
223 | |||
224 | |||
225 | } | 219 | } |
diff --git a/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs b/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs index 4a92120..331f1bd 100644 --- a/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs +++ b/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs | |||
@@ -267,24 +267,24 @@ namespace OpenSim.Region.OptionalModules.Materials | |||
267 | if (matsArr == null) | 267 | if (matsArr == null) |
268 | return partchanged; | 268 | return partchanged; |
269 | 269 | ||
270 | OSD tmpOSD; | ||
271 | foreach (OSD elemOsd in matsArr) | 270 | foreach (OSD elemOsd in matsArr) |
272 | { | 271 | { |
273 | if (elemOsd != null && elemOsd is OSDMap) | 272 | if (elemOsd != null && elemOsd is OSDMap) |
274 | { | 273 | { |
275 | OSDMap matMap = elemOsd as OSDMap; | 274 | OSDMap matMap = elemOsd as OSDMap; |
276 | if (matMap.ContainsKey("ID") && matMap.ContainsKey("Material")) | 275 | OSD OSDID; |
276 | OSD OSDMaterial; | ||
277 | if (matMap.TryGetValue("ID", out OSDID) && matMap.TryGetValue("Material", out OSDMaterial) && OSDMaterial is OSDMap) | ||
277 | { | 278 | { |
278 | try | 279 | try |
279 | { | 280 | { |
280 | lock (materialslock) | 281 | lock (materialslock) |
281 | { | 282 | { |
282 | tmpOSD = matMap["ID"]; | 283 | UUID id = OSDID.AsUUID(); |
283 | UUID id = tmpOSD.AsUUID(); | ||
284 | if(m_Materials.ContainsKey(id)) | 284 | if(m_Materials.ContainsKey(id)) |
285 | continue; | 285 | continue; |
286 | 286 | ||
287 | OSDMap theMatMap = (OSDMap)matMap["Material"]; | 287 | OSDMap theMatMap = (OSDMap)OSDMaterial; |
288 | FaceMaterial fmat = new FaceMaterial(theMatMap); | 288 | FaceMaterial fmat = new FaceMaterial(theMatMap); |
289 | 289 | ||
290 | if(fmat == null || | 290 | if(fmat == null || |
@@ -292,7 +292,7 @@ namespace OpenSim.Region.OptionalModules.Materials | |||
292 | && fmat.NormalMapID == UUID.Zero | 292 | && fmat.NormalMapID == UUID.Zero |
293 | && fmat.SpecularMapID == UUID.Zero)) | 293 | && fmat.SpecularMapID == UUID.Zero)) |
294 | continue; | 294 | continue; |
295 | 295 | ||
296 | fmat.ID = id; | 296 | fmat.ID = id; |
297 | m_Materials[id] = fmat; | 297 | m_Materials[id] = fmat; |
298 | m_MaterialsRefCount[id] = 0; | 298 | m_MaterialsRefCount[id] = 0; |
@@ -560,8 +560,7 @@ namespace OpenSim.Region.OptionalModules.Materials | |||
560 | uint primLocalID = 0; | 560 | uint primLocalID = 0; |
561 | try | 561 | try |
562 | { | 562 | { |
563 | tmpOSD = matsMap["ID"]; | 563 | primLocalID = matsMap["ID"].AsUInteger(); |
564 | primLocalID = tmpOSD.AsUInteger(); | ||
565 | } | 564 | } |
566 | catch (Exception e) | 565 | catch (Exception e) |
567 | { | 566 | { |
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index b7dbb79..f5e7771 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | |||
@@ -120,36 +120,26 @@ namespace OpenSim.Services.Connectors.Simulation | |||
120 | PackData(args, source, aCircuit, destination, flags); | 120 | PackData(args, source, aCircuit, destination, flags); |
121 | 121 | ||
122 | OSDMap result = WebUtil.PostToServiceCompressed(uri, args, 30000); | 122 | OSDMap result = WebUtil.PostToServiceCompressed(uri, args, 30000); |
123 | tmpOSD = result["success"]; | 123 | bool success = result["success"].AsBoolean(); |
124 | bool success = tmpOSD.AsBoolean(); | ||
125 | if (success && result.TryGetValue("_Result", out tmpOSD) && tmpOSD is OSDMap) | 124 | if (success && result.TryGetValue("_Result", out tmpOSD) && tmpOSD is OSDMap) |
126 | { | 125 | { |
127 | OSDMap data = (OSDMap)tmpOSD; | 126 | OSDMap data = (OSDMap)tmpOSD; |
128 | 127 | reason = data["reason"].AsString(); | |
129 | tmpOSD = data["reason"]; | 128 | success = data["success"].AsBoolean(); |
130 | reason = tmpOSD.AsString(); | ||
131 | |||
132 | tmpOSD = data["success"]; | ||
133 | success = tmpOSD.AsBoolean(); | ||
134 | return success; | 129 | return success; |
135 | } | 130 | } |
136 | 131 | ||
137 | // Try the old version, uncompressed | 132 | // Try the old version, uncompressed |
138 | result = WebUtil.PostToService(uri, args, 30000, false); | 133 | result = WebUtil.PostToService(uri, args, 30000, false); |
139 | 134 | ||
140 | tmpOSD = result["success"]; | 135 | success = result["success"].AsBoolean(); |
141 | success = tmpOSD.AsBoolean(); | ||
142 | if (success) | 136 | if (success) |
143 | { | 137 | { |
144 | if (result.TryGetValue("_Result", out tmpOSD) && tmpOSD is OSDMap) | 138 | if (result.TryGetValue("_Result", out tmpOSD) && tmpOSD is OSDMap) |
145 | { | 139 | { |
146 | OSDMap data = (OSDMap)tmpOSD; | 140 | OSDMap data = (OSDMap)tmpOSD; |
147 | 141 | reason = data["reason"].AsString(); | |
148 | tmpOSD = data["reason"]; | 142 | success = data["success"].AsBoolean(); |
149 | reason = tmpOSD.AsString(); | ||
150 | |||
151 | tmpOSD = data["success"]; | ||
152 | success = tmpOSD.AsBoolean(); | ||
153 | 143 | ||
154 | m_log.WarnFormat( | 144 | m_log.WarnFormat( |
155 | "[REMOTE SIMULATION CONNECTOR]: Remote simulator {0} did not accept compressed transfer, suggest updating it.", destination.RegionName); | 145 | "[REMOTE SIMULATION CONNECTOR]: Remote simulator {0} did not accept compressed transfer, suggest updating it.", destination.RegionName); |
@@ -327,8 +317,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
327 | { | 317 | { |
328 | OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 30000, false, false, true); | 318 | OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 30000, false, false, true); |
329 | 319 | ||
330 | tmpOSD = result["success"]; | 320 | bool success = result["success"].AsBoolean(); |
331 | bool success = tmpOSD.AsBoolean(); | ||
332 | 321 | ||
333 | bool has_Result = false; | 322 | bool has_Result = false; |
334 | if (result.TryGetValue("_Result", out tmpOSD)) | 323 | if (result.TryGetValue("_Result", out tmpOSD)) |
@@ -339,18 +328,14 @@ namespace OpenSim.Services.Connectors.Simulation | |||
339 | // FIXME: If there is a _Result map then it's the success key here that indicates the true success | 328 | // FIXME: If there is a _Result map then it's the success key here that indicates the true success |
340 | // or failure, not the sibling result node. | 329 | // or failure, not the sibling result node. |
341 | //nte4.8 crap | 330 | //nte4.8 crap |
342 | tmpOSD = data["success"]; | 331 | success = data["success"].AsBoolean(); |
343 | success = tmpOSD.AsBoolean(); | 332 | reason = data["reason"].AsString(); |
344 | |||
345 | tmpOSD = data["reason"]; | ||
346 | reason = tmpOSD.AsString(); | ||
347 | // We will need to plumb this and start sing the outbound version as well | 333 | // We will need to plumb this and start sing the outbound version as well |
348 | // TODO: lay the pipe for version plumbing | 334 | // TODO: lay the pipe for version plumbing |
349 | if (data.TryGetValue("negotiated_inbound_version", out tmpOSD) && tmpOSD != null) | 335 | if (data.TryGetValue("negotiated_inbound_version", out tmpOSD) && tmpOSD != null) |
350 | { | 336 | { |
351 | ctx.InboundVersion = (float)tmpOSD.AsReal(); | 337 | ctx.InboundVersion = (float)tmpOSD.AsReal(); |
352 | tmpOSD = data["negotiated_outbound_version"]; | 338 | ctx.OutboundVersion = (float)data["negotiated_outbound_version"].AsReal(); |
353 | ctx.OutboundVersion = (float)tmpOSD.AsReal(); | ||
354 | } | 339 | } |
355 | else if (data.TryGetValue("version", out tmpOSD) && tmpOSD != null) | 340 | else if (data.TryGetValue("version", out tmpOSD) && tmpOSD != null) |
356 | { | 341 | { |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 22748cc..b923761 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -1051,7 +1051,7 @@ namespace OpenSim.Services.LLLoginService | |||
1051 | } | 1051 | } |
1052 | aCircuit.ServiceURLs[keyName] = keyValue; | 1052 | aCircuit.ServiceURLs[keyName] = keyValue; |
1053 | 1053 | ||
1054 | m_log.DebugFormat("[LLLOGIN SERVICE]: found new key {0} {1}", keyName, aCircuit.ServiceURLs[keyName]); | 1054 | // m_log.DebugFormat("[LLLOGIN SERVICE]: found new key {0} {1}", keyName, aCircuit.ServiceURLs[keyName]); |
1055 | } | 1055 | } |
1056 | 1056 | ||
1057 | if (!account.ServiceURLs.ContainsKey("GatekeeperURI") && !string.IsNullOrEmpty(m_GatekeeperURL)) | 1057 | if (!account.ServiceURLs.ContainsKey("GatekeeperURI") && !string.IsNullOrEmpty(m_GatekeeperURL)) |