From 08dc07dc7691ce8ee3c81528bb45b9fdfc603a68 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 13 Jul 2011 00:48:36 +0100 Subject: [PATCH] refactor: Move all callers of the obsoleted SychronousRestObjectPoster.BeginPostObject() to the identical SynchronousRestObjectRequester.MakeRequest() --- .../Avatar/InstantMessage/OfflineMessageModule.cs | 7 ++++--- .../XmlRpcRouterModule/XmlRpcGridRouterModule.cs | 4 ++-- .../Services/HypergridService/HGInstantMessageService.cs | 8 +++----- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs index 321b38b3a3..8d055d4e89 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/OfflineMessageModule.cs @@ -173,9 +173,10 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage { if (m_RestURL != "") { - m_log.DebugFormat("[OFFLINE MESSAGING] Retrieving stored messages for {0}", client.AgentId); + m_log.DebugFormat("[OFFLINE MESSAGING]: Retrieving stored messages for {0}", client.AgentId); - List msglist = SynchronousRestObjectPoster.BeginPostObject>( + List msglist + = SynchronousRestObjectRequester.MakeRequest>( "POST", m_RestURL + "/RetrieveMessages/", client.AgentId); if (msglist == null) @@ -203,7 +204,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage if ((im.offline != 0) && (!im.fromGroup || (im.fromGroup && m_ForwardOfflineGroupMessages))) { - bool success = SynchronousRestObjectPoster.BeginPostObject( + bool success = SynchronousRestObjectRequester.MakeRequest( "POST", m_RestURL+"/SaveMessage/", im); if (im.dialog == (byte)InstantMessageDialog.MessageFromAgent) diff --git a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs index d18ac0a90c..2187449471 100644 --- a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs @@ -106,7 +106,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule info.channel = channel; info.uri = uri; - bool success = SynchronousRestObjectPoster.BeginPostObject( + bool success = SynchronousRestObjectRequester.MakeRequest( "POST", m_ServerURI+"/RegisterChannel/", info); if (!success) @@ -125,7 +125,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule if (m_Channels.ContainsKey(itemID)) { - bool success = SynchronousRestObjectPoster.BeginPostObject( + bool success = SynchronousRestObjectRequester.MakeRequest( "POST", m_ServerURI+"/RemoveChannel/", m_Channels[itemID]); if (!success) diff --git a/OpenSim/Services/HypergridService/HGInstantMessageService.cs b/OpenSim/Services/HypergridService/HGInstantMessageService.cs index ded589de2d..bb31fc951e 100644 --- a/OpenSim/Services/HypergridService/HGInstantMessageService.cs +++ b/OpenSim/Services/HypergridService/HGInstantMessageService.cs @@ -326,7 +326,6 @@ namespace OpenSim.Services.HypergridService // This is recursive!!!!! return TrySendInstantMessage(im, url, false, foreigner); } - } private bool UndeliveredMessage(GridInstantMessage im) @@ -335,15 +334,14 @@ namespace OpenSim.Services.HypergridService && (!im.fromGroup || (im.fromGroup && m_ForwardOfflineGroupMessages))) { m_log.DebugFormat("[HG IM SERVICE]: Message saved"); - return SynchronousRestObjectPoster.BeginPostObject( + + return SynchronousRestObjectRequester.MakeRequest( "POST", m_RestURL + "/SaveMessage/", im); - } - else { return false; } } } -} +} \ No newline at end of file