diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | 62 |
1 files changed, 61 insertions, 1 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 5b27cf6..2f263ae 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | |||
@@ -417,6 +417,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
417 | GetBoolResponse(request, out reason); | 417 | GetBoolResponse(request, out reason); |
418 | } | 418 | } |
419 | 419 | ||
420 | [Obsolete] | ||
420 | public List<UUID> StatusNotification(List<string> friends, UUID userID, bool online) | 421 | public List<UUID> StatusNotification(List<string> friends, UUID userID, bool online) |
421 | { | 422 | { |
422 | Hashtable hash = new Hashtable(); | 423 | Hashtable hash = new Hashtable(); |
@@ -789,13 +790,72 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
789 | } | 790 | } |
790 | catch | 791 | catch |
791 | { | 792 | { |
792 | m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on LocateUser response."); | 793 | m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on GetUUI response."); |
793 | // reason = "Exception: " + e.Message; | 794 | // reason = "Exception: " + e.Message; |
794 | } | 795 | } |
795 | 796 | ||
796 | return uui; | 797 | return uui; |
797 | } | 798 | } |
798 | 799 | ||
800 | public UUID GetUUID(String first, String last) | ||
801 | { | ||
802 | Hashtable hash = new Hashtable(); | ||
803 | hash["first"] = first; | ||
804 | hash["last"] = last; | ||
805 | |||
806 | IList paramList = new ArrayList(); | ||
807 | paramList.Add(hash); | ||
808 | |||
809 | XmlRpcRequest request = new XmlRpcRequest("get_uuid", paramList); | ||
810 | // string reason = string.Empty; | ||
811 | |||
812 | // Send and get reply | ||
813 | UUID uuid = UUID.Zero; | ||
814 | XmlRpcResponse response = null; | ||
815 | try | ||
816 | { | ||
817 | response = request.Send(m_ServerURL, 10000); | ||
818 | } | ||
819 | catch | ||
820 | { | ||
821 | m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0} for GetUUID", m_ServerURL); | ||
822 | // reason = "Exception: " + e.Message; | ||
823 | return uuid; | ||
824 | } | ||
825 | |||
826 | if (response.IsFault) | ||
827 | { | ||
828 | m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} for GetUUID returned an error: {1}", m_ServerURL, response.FaultString); | ||
829 | // reason = "XMLRPC Fault"; | ||
830 | return uuid; | ||
831 | } | ||
832 | |||
833 | hash = (Hashtable)response.Value; | ||
834 | //foreach (Object o in hash) | ||
835 | // m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value); | ||
836 | try | ||
837 | { | ||
838 | if (hash == null) | ||
839 | { | ||
840 | m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetUUDI Got null response from {0}! THIS IS BAAAAD", m_ServerURL); | ||
841 | // reason = "Internal error 1"; | ||
842 | return uuid; | ||
843 | } | ||
844 | |||
845 | // Here's the actual response | ||
846 | if (hash.ContainsKey("UUID")) | ||
847 | UUID.TryParse(hash["UUID"].ToString(), out uuid); | ||
848 | |||
849 | } | ||
850 | catch | ||
851 | { | ||
852 | m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on UUID response."); | ||
853 | // reason = "Exception: " + e.Message; | ||
854 | } | ||
855 | |||
856 | return uuid; | ||
857 | } | ||
858 | |||
799 | private bool GetBoolResponse(XmlRpcRequest request, out string reason) | 859 | private bool GetBoolResponse(XmlRpcRequest request, out string reason) |
800 | { | 860 | { |
801 | //m_log.Debug("[USER AGENT CONNECTOR]: GetBoolResponse from/to " + m_ServerURL); | 861 | //m_log.Debug("[USER AGENT CONNECTOR]: GetBoolResponse from/to " + m_ServerURL); |