* refactor: drop AddXmlRpcHandler() from scene in favour of call via CommsManager
parent
df82eaf8a8
commit
2a4c4ceebb
|
@ -32,15 +32,16 @@ using System.Net;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using OpenMetaverse;
|
|
||||||
using log4net;
|
using log4net;
|
||||||
using Nini.Config;
|
using Nini.Config;
|
||||||
using Nwc.XmlRpc;
|
using Nwc.XmlRpc;
|
||||||
|
using OpenMetaverse;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
using OpenSim.Framework.Communications.Cache;
|
||||||
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Region.Environment.Interfaces;
|
using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Interfaces;
|
using OpenSim.Region.Interfaces;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
using OpenSim.Framework.Communications.Cache;
|
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
|
namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
|
||||||
{
|
{
|
||||||
|
@ -133,6 +134,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
|
||||||
if (m_enabled)
|
if (m_enabled)
|
||||||
{
|
{
|
||||||
scene.RegisterModuleInterface<IMoneyModule>(this);
|
scene.RegisterModuleInterface<IMoneyModule>(this);
|
||||||
|
BaseHttpServer httpServer = scene.CommsManager.HttpServer;
|
||||||
|
|
||||||
lock (m_scenel)
|
lock (m_scenel)
|
||||||
{
|
{
|
||||||
|
@ -149,16 +151,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
|
||||||
{
|
{
|
||||||
// Centralized grid structure using OpenSimWi Redux revision 9+
|
// Centralized grid structure using OpenSimWi Redux revision 9+
|
||||||
// https://opensimwiredux.svn.sourceforge.net/svnroot/opensimwiredux
|
// https://opensimwiredux.svn.sourceforge.net/svnroot/opensimwiredux
|
||||||
scene.AddXmlRPCHandler("balanceUpdateRequest", GridMoneyUpdate);
|
httpServer.AddXmlRPCHandler("balanceUpdateRequest", GridMoneyUpdate);
|
||||||
scene.AddXmlRPCHandler("userAlert", UserAlert);
|
httpServer.AddXmlRPCHandler("userAlert", UserAlert);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Local Server.. enables functionality only.
|
// Local Server.. enables functionality only.
|
||||||
scene.AddXmlRPCHandler("getCurrencyQuote", quote_func);
|
httpServer.AddXmlRPCHandler("getCurrencyQuote", quote_func);
|
||||||
scene.AddXmlRPCHandler("buyCurrency", buy_func);
|
httpServer.AddXmlRPCHandler("buyCurrency", buy_func);
|
||||||
scene.AddXmlRPCHandler("preflightBuyLandPrep", preflightBuyLandPrep_func);
|
httpServer.AddXmlRPCHandler("preflightBuyLandPrep", preflightBuyLandPrep_func);
|
||||||
scene.AddXmlRPCHandler("buyLandPrep", landBuy_func);
|
httpServer.AddXmlRPCHandler("buyLandPrep", landBuy_func);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -116,8 +116,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
|
||||||
{
|
{
|
||||||
if (m_scenes.Count == 0)
|
if (m_scenes.Count == 0)
|
||||||
{
|
{
|
||||||
scene.AddXmlRPCHandler("presence_update_bulk", processPresenceUpdateBulk);
|
scene.CommsManager.HttpServer.AddXmlRPCHandler("presence_update_bulk", processPresenceUpdateBulk);
|
||||||
scene.AddXmlRPCHandler("terminate_friend", processTerminateFriend);
|
scene.CommsManager.HttpServer.AddXmlRPCHandler("terminate_friend", processTerminateFriend);
|
||||||
m_friendLists.DefaultTTL = new TimeSpan(1, 0, 0); // store entries for one hour max
|
m_friendLists.DefaultTTL = new TimeSpan(1, 0, 0); // store entries for one hour max
|
||||||
m_initialScene = scene;
|
m_initialScene = scene;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,7 +69,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
|
||||||
{
|
{
|
||||||
if (m_Scenes.Count == 0)
|
if (m_Scenes.Count == 0)
|
||||||
{
|
{
|
||||||
scene.AddXmlRPCHandler("grid_instant_message", processXMLRPCGridInstantMessage);
|
scene.CommsManager.HttpServer.AddXmlRPCHandler(
|
||||||
|
"grid_instant_message", processXMLRPCGridInstantMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
scene.RegisterModuleInterface<IMessageTransferModule>(this);
|
scene.RegisterModuleInterface<IMessageTransferModule>(this);
|
||||||
|
|
|
@ -4185,11 +4185,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
return m_httpListener.AddHTTPHandler(method, handler);
|
return m_httpListener.AddHTTPHandler(method, handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool AddXmlRPCHandler(string method, XmlRpcMethod handler)
|
|
||||||
{
|
|
||||||
return m_httpListener.AddXmlRPCHandler(method, handler);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddStreamHandler(IRequestHandler handler)
|
public void AddStreamHandler(IRequestHandler handler)
|
||||||
{
|
{
|
||||||
m_httpListener.AddStreamHandler(handler);
|
m_httpListener.AddStreamHandler(handler);
|
||||||
|
|
Loading…
Reference in New Issue