diff options
author | Diva Canto | 2011-05-26 10:04:48 -0700 |
---|---|---|
committer | Diva Canto | 2011-05-26 10:04:48 -0700 |
commit | 0c58a9e68074f3593920dc9f2356bbed96416497 (patch) | |
tree | 6bccb313c233ab6486195e8a3663cfa1d30c41b9 /OpenSim/Services/Connectors | |
parent | HG: Renamed, shuffled some interfaces around. Move them all to IHypergridServ... (diff) | |
download | opensim-SC_OLD-0c58a9e68074f3593920dc9f2356bbed96416497.zip opensim-SC_OLD-0c58a9e68074f3593920dc9f2356bbed96416497.tar.gz opensim-SC_OLD-0c58a9e68074f3593920dc9f2356bbed96416497.tar.bz2 opensim-SC_OLD-0c58a9e68074f3593920dc9f2356bbed96416497.tar.xz |
HG IM in grid mode working fairly well. Unknown target user references looked back in source user's User Agent service.
Diffstat (limited to 'OpenSim/Services/Connectors')
-rw-r--r-- | OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | 61 | ||||
-rw-r--r-- | OpenSim/Services/Connectors/InstantMessage/InstantMessageServiceConnector.cs | 1 |
2 files changed, 62 insertions, 0 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 50036b3..1c01563 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | |||
@@ -576,6 +576,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
576 | XmlRpcResponse response = null; | 576 | XmlRpcResponse response = null; |
577 | try | 577 | try |
578 | { | 578 | { |
579 | m_log.DebugFormat("[XXX]: Calling locate_user on {0}", m_ServerURL); | ||
579 | response = request.Send(m_ServerURL, 10000); | 580 | response = request.Send(m_ServerURL, 10000); |
580 | } | 581 | } |
581 | catch (Exception e) | 582 | catch (Exception e) |
@@ -618,6 +619,66 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
618 | return url; | 619 | return url; |
619 | } | 620 | } |
620 | 621 | ||
622 | public string GetUUI(UUID userID, UUID targetUserID) | ||
623 | { | ||
624 | Hashtable hash = new Hashtable(); | ||
625 | hash["userID"] = userID.ToString(); | ||
626 | hash["targetUserID"] = targetUserID.ToString(); | ||
627 | |||
628 | IList paramList = new ArrayList(); | ||
629 | paramList.Add(hash); | ||
630 | |||
631 | XmlRpcRequest request = new XmlRpcRequest("get_uui", paramList); | ||
632 | string reason = string.Empty; | ||
633 | |||
634 | // Send and get reply | ||
635 | string uui = string.Empty; | ||
636 | XmlRpcResponse response = null; | ||
637 | try | ||
638 | { | ||
639 | m_log.DebugFormat("[XXX]: Calling get_uuid on {0}", m_ServerURL); | ||
640 | response = request.Send(m_ServerURL, 10000); | ||
641 | } | ||
642 | catch (Exception e) | ||
643 | { | ||
644 | m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0}", m_ServerURL); | ||
645 | reason = "Exception: " + e.Message; | ||
646 | return uui; | ||
647 | } | ||
648 | |||
649 | if (response.IsFault) | ||
650 | { | ||
651 | m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} returned an error: {1}", m_ServerURL, response.FaultString); | ||
652 | reason = "XMLRPC Fault"; | ||
653 | return uui; | ||
654 | } | ||
655 | |||
656 | hash = (Hashtable)response.Value; | ||
657 | //foreach (Object o in hash) | ||
658 | // m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value); | ||
659 | try | ||
660 | { | ||
661 | if (hash == null) | ||
662 | { | ||
663 | m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetUUI Got null response from {0}! THIS IS BAAAAD", m_ServerURL); | ||
664 | reason = "Internal error 1"; | ||
665 | return uui; | ||
666 | } | ||
667 | |||
668 | // Here's the actual response | ||
669 | if (hash.ContainsKey("UUI")) | ||
670 | uui = hash["UUI"].ToString(); | ||
671 | |||
672 | } | ||
673 | catch (Exception e) | ||
674 | { | ||
675 | m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on LocateUser response."); | ||
676 | reason = "Exception: " + e.Message; | ||
677 | } | ||
678 | |||
679 | return uui; | ||
680 | } | ||
681 | |||
621 | private bool GetBoolResponse(XmlRpcRequest request, out string reason) | 682 | private bool GetBoolResponse(XmlRpcRequest request, out string reason) |
622 | { | 683 | { |
623 | //m_log.Debug("[USER AGENT CONNECTOR]: GetBoolResponse from/to " + m_ServerURL); | 684 | //m_log.Debug("[USER AGENT CONNECTOR]: GetBoolResponse from/to " + m_ServerURL); |
diff --git a/OpenSim/Services/Connectors/InstantMessage/InstantMessageServiceConnector.cs b/OpenSim/Services/Connectors/InstantMessage/InstantMessageServiceConnector.cs index 65ee7c7..2a922de 100644 --- a/OpenSim/Services/Connectors/InstantMessage/InstantMessageServiceConnector.cs +++ b/OpenSim/Services/Connectors/InstantMessage/InstantMessageServiceConnector.cs | |||
@@ -80,6 +80,7 @@ namespace OpenSim.Services.Connectors.InstantMessage | |||
80 | } | 80 | } |
81 | else | 81 | else |
82 | { | 82 | { |
83 | m_log.DebugFormat("[GRID INSTANT MESSAGE]: No response from {0}", url); | ||
83 | return false; | 84 | return false; |
84 | } | 85 | } |
85 | } | 86 | } |