From 2a4c4ceebb6bf9d3349a2f4fbefd84e4748a78a0 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 6 Jan 2009 14:20:54 +0000 Subject: * refactor: drop AddXmlRpcHandler() from scene in favour of call via CommsManager --- .../Avatar/Currency/SampleMoney/SampleMoneyModule.cs | 18 ++++++++++-------- .../Modules/Avatar/Friends/FriendsModule.cs | 4 ++-- .../Avatar/InstantMessage/MessageTransferModule.cs | 3 ++- 3 files changed, 14 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/Environment/Modules') diff --git a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs index f87e2dd..3071026 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs @@ -32,15 +32,16 @@ using System.Net; using System.Net.Sockets; using System.Reflection; using System.Xml; -using OpenMetaverse; using log4net; using Nini.Config; using Nwc.XmlRpc; +using OpenMetaverse; using OpenSim.Framework; +using OpenSim.Framework.Communications.Cache; +using OpenSim.Framework.Servers; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Interfaces; using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework.Communications.Cache; namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney { @@ -133,6 +134,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney if (m_enabled) { scene.RegisterModuleInterface(this); + BaseHttpServer httpServer = scene.CommsManager.HttpServer; lock (m_scenel) { @@ -149,16 +151,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney { // Centralized grid structure using OpenSimWi Redux revision 9+ // https://opensimwiredux.svn.sourceforge.net/svnroot/opensimwiredux - scene.AddXmlRPCHandler("balanceUpdateRequest", GridMoneyUpdate); - scene.AddXmlRPCHandler("userAlert", UserAlert); + httpServer.AddXmlRPCHandler("balanceUpdateRequest", GridMoneyUpdate); + httpServer.AddXmlRPCHandler("userAlert", UserAlert); } else { // Local Server.. enables functionality only. - scene.AddXmlRPCHandler("getCurrencyQuote", quote_func); - scene.AddXmlRPCHandler("buyCurrency", buy_func); - scene.AddXmlRPCHandler("preflightBuyLandPrep", preflightBuyLandPrep_func); - scene.AddXmlRPCHandler("buyLandPrep", landBuy_func); + httpServer.AddXmlRPCHandler("getCurrencyQuote", quote_func); + httpServer.AddXmlRPCHandler("buyCurrency", buy_func); + httpServer.AddXmlRPCHandler("preflightBuyLandPrep", preflightBuyLandPrep_func); + httpServer.AddXmlRPCHandler("buyLandPrep", landBuy_func); } } diff --git a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs index 3490b6f..b752404 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs @@ -116,8 +116,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends { if (m_scenes.Count == 0) { - scene.AddXmlRPCHandler("presence_update_bulk", processPresenceUpdateBulk); - scene.AddXmlRPCHandler("terminate_friend", processTerminateFriend); + scene.CommsManager.HttpServer.AddXmlRPCHandler("presence_update_bulk", processPresenceUpdateBulk); + scene.CommsManager.HttpServer.AddXmlRPCHandler("terminate_friend", processTerminateFriend); m_friendLists.DefaultTTL = new TimeSpan(1, 0, 0); // store entries for one hour max m_initialScene = scene; } diff --git a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/MessageTransferModule.cs index 353cc77..3977963 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/MessageTransferModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/MessageTransferModule.cs @@ -69,7 +69,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage { if (m_Scenes.Count == 0) { - scene.AddXmlRPCHandler("grid_instant_message", processXMLRPCGridInstantMessage); + scene.CommsManager.HttpServer.AddXmlRPCHandler( + "grid_instant_message", processXMLRPCGridInstantMessage); } scene.RegisterModuleInterface(this); -- cgit v1.1