From 6f2961f0e2492dc7cc1a2753e42a0f960fcc6326 Mon Sep 17 00:00:00 2001 From: justincc Date: Tue, 15 Dec 2009 15:10:29 +0000 Subject: [PATCH] Fix casting problems where I assumed return value was still a XmlRpcResponse rather than the value HashTable --- .../InterMessageUserServerModule.cs | 12 +++++++----- .../Grid/MessagingServer.Modules/MessageService.cs | 7 ++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/OpenSim/Grid/MessagingServer.Modules/InterMessageUserServerModule.cs b/OpenSim/Grid/MessagingServer.Modules/InterMessageUserServerModule.cs index d667af3ece..ea0a08813c 100644 --- a/OpenSim/Grid/MessagingServer.Modules/InterMessageUserServerModule.cs +++ b/OpenSim/Grid/MessagingServer.Modules/InterMessageUserServerModule.cs @@ -113,12 +113,14 @@ namespace OpenSim.Grid.MessagingServer.Modules // Send Request try { - XmlRpcRequest UserReq = new XmlRpcRequest("register_messageserver", SendParams); - XmlRpcResponse UserResp = (XmlRpcResponse)UserReq.Invoke(srv); - //XmlRpcResponse UserResp = UserReq.Send(srv, 16000); + XmlRpcRequest UserReq = new XmlRpcRequest("register_messageserver", SendParams); + ////XmlRpcResponse UserResp = UserReq.Send(srv, 16000); + + //// Process Response + //Hashtable GridRespData = (Hashtable)UserResp.Value; + + Hashtable GridRespData = (Hashtable)UserReq.Invoke(srv); - // Process Response - Hashtable GridRespData = (Hashtable)UserResp.Value; // if we got a response, we were successful if (!GridRespData.ContainsKey("responsestring")) success = false; diff --git a/OpenSim/Grid/MessagingServer.Modules/MessageService.cs b/OpenSim/Grid/MessagingServer.Modules/MessageService.cs index ec7791b644..731946eb00 100644 --- a/OpenSim/Grid/MessagingServer.Modules/MessageService.cs +++ b/OpenSim/Grid/MessagingServer.Modules/MessageService.cs @@ -269,10 +269,11 @@ namespace OpenSim.Grid.MessagingServer.Modules IList parameters = new ArrayList(); parameters.Add(param); - XmlRpcRequest req = new XmlRpcRequest("get_user_friend_list", parameters); - XmlRpcResponse resp = (XmlRpcResponse)req.Invoke(m_cfg.UserServerURL); + XmlRpcRequest req = new XmlRpcRequest("get_user_friend_list", parameters); //XmlRpcResponse resp = req.Send(m_cfg.UserServerURL, 3000); - Hashtable respData = (Hashtable)resp.Value; + //Hashtable respData = (Hashtable)resp.Value; + + Hashtable respData = (Hashtable)req.Invoke(m_cfg.UserServerURL); if (respData.Contains("avcount")) {