diff options
author | Melanie | 2012-03-21 00:26:02 +0000 |
---|---|---|
committer | Melanie | 2012-03-21 00:26:02 +0000 |
commit | ee9210f656f754e2caa40cb6ff39463cbf286347 (patch) | |
tree | 8097bad8a37e210bfbdeff113a9ab00d853ad9ac /OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Refix the fixed fix! (diff) | |
download | opensim-SC_OLD-ee9210f656f754e2caa40cb6ff39463cbf286347.zip opensim-SC_OLD-ee9210f656f754e2caa40cb6ff39463cbf286347.tar.gz opensim-SC_OLD-ee9210f656f754e2caa40cb6ff39463cbf286347.tar.bz2 opensim-SC_OLD-ee9210f656f754e2caa40cb6ff39463cbf286347.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
Diffstat (limited to 'OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs')
-rw-r--r-- | OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | 61 |
1 files changed, 60 insertions, 1 deletions
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index d617aee..c07c6a6 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | |||
@@ -787,13 +787,72 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
787 | } | 787 | } |
788 | catch | 788 | catch |
789 | { | 789 | { |
790 | m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on LocateUser response."); | 790 | m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on GetUUI response."); |
791 | // reason = "Exception: " + e.Message; | 791 | // reason = "Exception: " + e.Message; |
792 | } | 792 | } |
793 | 793 | ||
794 | return uui; | 794 | return uui; |
795 | } | 795 | } |
796 | 796 | ||
797 | public UUID GetUUID(String first, String last) | ||
798 | { | ||
799 | Hashtable hash = new Hashtable(); | ||
800 | hash["first"] = first; | ||
801 | hash["last"] = last; | ||
802 | |||
803 | IList paramList = new ArrayList(); | ||
804 | paramList.Add(hash); | ||
805 | |||
806 | XmlRpcRequest request = new XmlRpcRequest("get_uuid", paramList); | ||
807 | // string reason = string.Empty; | ||
808 | |||
809 | // Send and get reply | ||
810 | UUID uuid = UUID.Zero; | ||
811 | XmlRpcResponse response = null; | ||
812 | try | ||
813 | { | ||
814 | response = request.Send(m_ServerURL, 10000); | ||
815 | } | ||
816 | catch | ||
817 | { | ||
818 | m_log.DebugFormat("[USER AGENT CONNECTOR]: Unable to contact remote server {0} for GetUUID", m_ServerURL); | ||
819 | // reason = "Exception: " + e.Message; | ||
820 | return uuid; | ||
821 | } | ||
822 | |||
823 | if (response.IsFault) | ||
824 | { | ||
825 | m_log.ErrorFormat("[USER AGENT CONNECTOR]: remote call to {0} for GetUUID returned an error: {1}", m_ServerURL, response.FaultString); | ||
826 | // reason = "XMLRPC Fault"; | ||
827 | return uuid; | ||
828 | } | ||
829 | |||
830 | hash = (Hashtable)response.Value; | ||
831 | //foreach (Object o in hash) | ||
832 | // m_log.Debug(">> " + ((DictionaryEntry)o).Key + ":" + ((DictionaryEntry)o).Value); | ||
833 | try | ||
834 | { | ||
835 | if (hash == null) | ||
836 | { | ||
837 | m_log.ErrorFormat("[USER AGENT CONNECTOR]: GetUUDI Got null response from {0}! THIS IS BAAAAD", m_ServerURL); | ||
838 | // reason = "Internal error 1"; | ||
839 | return uuid; | ||
840 | } | ||
841 | |||
842 | // Here's the actual response | ||
843 | if (hash.ContainsKey("UUID")) | ||
844 | UUID.TryParse(hash["UUID"].ToString(), out uuid); | ||
845 | |||
846 | } | ||
847 | catch | ||
848 | { | ||
849 | m_log.ErrorFormat("[USER AGENT CONNECTOR]: Got exception on UUID response."); | ||
850 | // reason = "Exception: " + e.Message; | ||
851 | } | ||
852 | |||
853 | return uuid; | ||
854 | } | ||
855 | |||
797 | private bool GetBoolResponse(XmlRpcRequest request, out string reason) | 856 | private bool GetBoolResponse(XmlRpcRequest request, out string reason) |
798 | { | 857 | { |
799 | //m_log.Debug("[USER AGENT CONNECTOR]: GetBoolResponse from/to " + m_ServerURL); | 858 | //m_log.Debug("[USER AGENT CONNECTOR]: GetBoolResponse from/to " + m_ServerURL); |