diff options
Diffstat (limited to 'OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | 35 |
1 files changed, 10 insertions, 25 deletions
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 | { |