diff options
author | Melanie | 2010-08-05 08:20:32 +0100 |
---|---|---|
committer | Melanie | 2010-08-05 08:20:32 +0100 |
commit | 9e9296848de521420724daa6035f793e5f9f1af8 (patch) | |
tree | 74ff9d57f9b809e39970030afa5afd934174bdab /OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | |
parent | Prevent setting the hovertext from firing changed_color (diff) | |
parent | Merge branch 'iar-merge' (diff) | |
download | opensim-SC-9e9296848de521420724daa6035f793e5f9f1af8.zip opensim-SC-9e9296848de521420724daa6035f793e5f9f1af8.tar.gz opensim-SC-9e9296848de521420724daa6035f793e5f9f1af8.tar.bz2 opensim-SC-9e9296848de521420724daa6035f793e5f9f1af8.tar.xz |
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 42eca05..96d2605 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | |||
@@ -358,7 +358,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
358 | 358 | ||
359 | private bool GetBoolResponse(XmlRpcRequest request, out string reason) | 359 | private bool GetBoolResponse(XmlRpcRequest request, out string reason) |
360 | { | 360 | { |
361 | //m_log.Debug("[HGrid]: Linking to " + uri); | 361 | //m_log.Debug("[USER AGENT CONNECTOR]: GetBoolResponse from/to " + m_ServerURL); |
362 | XmlRpcResponse response = null; | 362 | XmlRpcResponse response = null; |
363 | try | 363 | try |
364 | { | 364 | { |
@@ -366,14 +366,14 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
366 | } | 366 | } |
367 | catch (Exception e) | 367 | catch (Exception e) |
368 | { | 368 | { |
369 | m_log.Debug("[USER AGENT CONNECTOR]: Unable to contact remote server "); | 369 | m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0}", m_ServerURL); |
370 | reason = "Exception: " + e.Message; | 370 | reason = "Exception: " + e.Message; |
371 | return false; | 371 | return false; |
372 | } | 372 | } |
373 | 373 | ||
374 | if (response.IsFault) | 374 | if (response.IsFault) |
375 | { | 375 | { |
376 | m_log.ErrorFormat("[HGrid]: remote call returned an error: {0}", response.FaultString); | 376 | m_log.ErrorFormat("[HGrid]: remote call to {0} returned an error: {1}", m_ServerURL, response.FaultString); |
377 | reason = "XMLRPC Fault"; | 377 | reason = "XMLRPC Fault"; |
378 | return false; | 378 | return false; |
379 | } | 379 | } |
@@ -383,15 +383,29 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
383 | // m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value); | 383 | // m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value); |
384 | try | 384 | try |
385 | { | 385 | { |
386 | if (hash == null) | ||
387 | { | ||
388 | m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got null response from {0}! THIS IS BAAAAD", m_ServerURL); | ||
389 | reason = "Internal error 1"; | ||
390 | return false; | ||
391 | } | ||
386 | bool success = false; | 392 | bool success = false; |
387 | reason = string.Empty; | 393 | reason = string.Empty; |
388 | Boolean.TryParse((string)hash["result"], out success); | 394 | if (hash.ContainsKey("result")) |
395 | Boolean.TryParse((string)hash["result"], out success); | ||
396 | else | ||
397 | { | ||
398 | reason = "Internal error 2"; | ||
399 | m_log.WarnFormat("[USER AGENT CONNECTOR]: response from {0} does not have expected key 'result'", m_ServerURL); | ||
400 | } | ||
389 | 401 | ||
390 | return success; | 402 | return success; |
391 | } | 403 | } |
392 | catch (Exception e) | 404 | catch (Exception e) |
393 | { | 405 | { |
394 | m_log.Error("[HGrid]: Got exception while parsing GetEndPoint response " + e.StackTrace); | 406 | m_log.ErrorFormat("[HGrid]: Got exception on GetBoolResponse response."); |
407 | if (hash.ContainsKey("result") && hash["result"] != null) | ||
408 | m_log.ErrorFormat("Reply was ", (string)hash["result"]); | ||
395 | reason = "Exception: " + e.Message; | 409 | reason = "Exception: " + e.Message; |
396 | return false; | 410 | return false; |
397 | } | 411 | } |