diff --git a/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs b/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs
index d56a9d9275..4d6467ab8a 100644
--- a/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs
+++ b/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs
@@ -168,8 +168,8 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
{
m_commsManager
= new CommunicationsLocal(
- m_openSim.ConfigurationSettings, m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache,
- libraryRootFolder, false);
+ m_openSim.ConfigurationSettings, m_openSim.NetServersInfo,
+ libraryRootFolder);
CreateGridInfoService();
}
@@ -177,7 +177,7 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
protected virtual void InitialiseGridServices(LibraryRootFolder libraryRootFolder)
{
m_commsManager
- = new CommunicationsOGS1(m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, libraryRootFolder);
+ = new CommunicationsOGS1(m_openSim.NetServersInfo, libraryRootFolder);
m_httpServer.AddStreamHandler(new OpenSim.SimStatusHandler());
m_httpServer.AddStreamHandler(new OpenSim.XSimStatusHandler(m_openSim));
@@ -206,8 +206,8 @@ namespace OpenSim.ApplicationPlugins.CreateCommsManager
{
m_commsManager
= new HGCommunicationsGridMode(
- m_openSim.NetServersInfo, m_httpServer,
- m_openSim.AssetCache, m_openSim.SceneManager, libraryRootFolder);
+ m_openSim.NetServersInfo,
+ m_openSim.SceneManager, libraryRootFolder);
HGServices = ((HGCommunicationsGridMode) m_commsManager).HGServices;
diff --git a/OpenSim/Client/Linden/LLProxyLoginModule.cs b/OpenSim/Client/Linden/LLProxyLoginModule.cs
index 88b7972c15..f7608d175c 100644
--- a/OpenSim/Client/Linden/LLProxyLoginModule.cs
+++ b/OpenSim/Client/Linden/LLProxyLoginModule.cs
@@ -143,8 +143,8 @@ namespace OpenSim.Client.Linden
protected void AddHttpHandlers()
{
//we will add our handlers to the first scene we received, as all scenes share a http server. But will this ever change?
- m_firstScene.CommsManager.HttpServer.AddXmlRPCHandler("expect_user", ExpectUser);
- m_firstScene.CommsManager.HttpServer.AddXmlRPCHandler("logoff_user", LogOffUser);
+ MainServer.Instance.AddXmlRPCHandler("expect_user", ExpectUser);
+ MainServer.Instance.AddXmlRPCHandler("logoff_user", LogOffUser);
}
protected void AddScene(Scene scene)
diff --git a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs
index 02a3b3728a..21197f8f62 100644
--- a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs
+++ b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs
@@ -130,7 +130,7 @@ namespace OpenSim.Client.Linden
LibraryRootFolder rootFolder
= m_firstScene.CommsManager.UserProfileCacheService.LibraryRoot as LibraryRootFolder;
- IHttpServer httpServer = m_firstScene.CommsManager.HttpServer;
+ IHttpServer httpServer = MainServer.Instance;
//TODO: fix the casting of the user service, maybe by registering the userManagerBase with scenes, or refactoring so we just need a IUserService reference
m_loginService
diff --git a/OpenSim/Client/VWoHTTP/VWoHTTPModule.cs b/OpenSim/Client/VWoHTTP/VWoHTTPModule.cs
index b1596be2e8..31385ba0b2 100644
--- a/OpenSim/Client/VWoHTTP/VWoHTTPModule.cs
+++ b/OpenSim/Client/VWoHTTP/VWoHTTPModule.cs
@@ -20,8 +20,7 @@
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
@@ -31,6 +30,7 @@ using System.Text;
using Nini.Config;
using OpenMetaverse;
using OpenSim.Client.VWoHTTP.ClientStack;
+using OpenSim.Framework;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Region.Framework.Interfaces;
@@ -57,7 +57,7 @@ namespace OpenSim.Client.VWoHTTP
m_scenes.Add(scene);
- m_httpd = scene.CommsManager.HttpServer;
+ m_httpd = MainServer.Instance;
}
public void PostInitialise()
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index c78212d64e..e1a70e5764 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -29,12 +29,11 @@ using System;
using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Framework.Communications.Cache;
-using OpenSim.Framework.Servers.HttpServer;
namespace OpenSim.Framework.Communications
{
///
- /// This class manages references to OpenSim non-region services (asset, inventory, user, etc.)
+ /// This class manages references to OpenSim non-region services (inventory, user, etc.)
///
///
/// TODO: Service retrieval needs to be managed via plugin and interfaces requests, as happens for region
@@ -99,28 +98,15 @@ namespace OpenSim.Framework.Communications
}
protected IUserAdminService m_userAdminService;
- ///
- /// OpenSimulator's built in HTTP server
- ///
- public IHttpServer HttpServer
- {
- get { return m_httpServer; }
- }
- protected IHttpServer m_httpServer;
-
///
/// Constructor
///
///
- ///
- ///
- ///
- public CommunicationsManager(NetworkServersInfo serversInfo, IHttpServer httpServer, IAssetCache assetCache,
- bool dumpAssetsToFile, LibraryRootFolder libraryRootFolder)
+ public CommunicationsManager(NetworkServersInfo serversInfo,
+ LibraryRootFolder libraryRootFolder)
{
m_networkServersInfo = serversInfo;
m_userProfileCacheService = new UserProfileCacheService(this, libraryRootFolder);
- m_httpServer = httpServer;
}
#region Inventory
diff --git a/OpenSim/Grid/UserServer/UserServerCommsManager.cs b/OpenSim/Grid/UserServer/UserServerCommsManager.cs
index 9adb3bcd44..7200836887 100644
--- a/OpenSim/Grid/UserServer/UserServerCommsManager.cs
+++ b/OpenSim/Grid/UserServer/UserServerCommsManager.cs
@@ -32,7 +32,7 @@ namespace OpenSim.Grid.UserServer
public class UserServerCommsManager : CommunicationsManager
{
public UserServerCommsManager(IInterServiceInventoryServices interServiceInventoryService)
- : base(null, null, null, false, null)
+ : base(null, null)
{
m_interServiceInventoryService = interServiceInventoryService;
}
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index a42fd3dcee..671ea67fd2 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -391,7 +391,7 @@ namespace OpenSim
scene.LoadPrimsFromStorage(regionInfo.originRegionID);
// TODO : Try setting resource for region xstats here on scene
- scene.CommsManager.HttpServer.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo));
+ MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo));
try
{
diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs
index 6767c325e2..0e7ab9b366 100644
--- a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs
+++ b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs
@@ -50,12 +50,12 @@ namespace OpenSim.Region.Communications.Hypergrid
}
public HGCommunicationsGridMode(
- NetworkServersInfo serversInfo, BaseHttpServer httpServer,
- IAssetCache assetCache, SceneManager sman, LibraryRootFolder libraryRootFolder)
- : base(serversInfo, httpServer, assetCache, false, libraryRootFolder)
+ NetworkServersInfo serversInfo,
+ SceneManager sman, LibraryRootFolder libraryRootFolder)
+ : base(serversInfo, libraryRootFolder)
{
// From constructor at CommunicationsOGS1
- HGGridServices gridInterComms = new HGGridServicesGridMode(serversInfo, httpServer, assetCache, sman, m_userProfileCacheService);
+ HGGridServices gridInterComms = new HGGridServicesGridMode(serversInfo, sman, m_userProfileCacheService);
m_gridService = gridInterComms;
m_osw = gridInterComms;
diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs
index f9c80755ec..3ea987cfb2 100644
--- a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs
+++ b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs
@@ -48,7 +48,7 @@ namespace OpenSim.Region.Communications.Hypergrid
HGGridServices gridService,
LibraryRootFolder libraryRootFolder,
bool dumpAssetsToFile)
- : base(serversInfo, httpServer, assetCache, dumpAssetsToFile, libraryRootFolder)
+ : base(serversInfo, libraryRootFolder)
{
LocalUserServices localUserService =
new LocalUserServices(
diff --git a/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs b/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs
index 58711e5dde..54cde0f54b 100644
--- a/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs
+++ b/OpenSim/Region/Communications/Hypergrid/HGGridServices.cs
@@ -63,7 +63,6 @@ namespace OpenSim.Region.Communications.Hypergrid
public BaseHttpServer httpListener;
public NetworkServersInfo serversInfo;
- public BaseHttpServer httpServer;
protected List m_regionsOnInstance = new List();
@@ -76,7 +75,6 @@ namespace OpenSim.Region.Communications.Hypergrid
// This is key-ed on agent ID
protected Dictionary m_knownRegions = new Dictionary();
- protected IAssetCache m_assetcache;
protected UserProfileCacheService m_userProfileCache;
protected SceneManager m_sceneman;
@@ -112,18 +110,15 @@ namespace OpenSim.Region.Communications.Hypergrid
/// Contructor. Adds "expect_hg_user" and "check" xmlrpc method handlers
///
///
- ///
- public HGGridServices(NetworkServersInfo servers_info, BaseHttpServer httpServe, IAssetCache asscache, SceneManager sman)
+ public HGGridServices(NetworkServersInfo servers_info, SceneManager sman)
{
serversInfo = servers_info;
- httpServer = httpServe;
- m_assetcache = asscache;
m_sceneman = sman;
random = new Random();
- httpServer.AddXmlRPCHandler("link_region", LinkRegionRequest);
- httpServer.AddXmlRPCHandler("expect_hg_user", ExpectHGUser);
+ MainServer.Instance.AddXmlRPCHandler("link_region", LinkRegionRequest);
+ MainServer.Instance.AddXmlRPCHandler("expect_hg_user", ExpectHGUser);
HGNetworkServersInfo.Init(servers_info.AssetURL, servers_info.InventoryURL, servers_info.UserURL);
}
diff --git a/OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs b/OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs
index 09a7fcc580..5ce1e79c71 100644
--- a/OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs
+++ b/OpenSim/Region/Communications/Hypergrid/HGGridServicesGridMode.cs
@@ -65,11 +65,11 @@ namespace OpenSim.Region.Communications.Hypergrid
set { m_remoteBackend.RegionLoginsEnabled = value; }
}
- public HGGridServicesGridMode(NetworkServersInfo servers_info, BaseHttpServer httpServe,
- IAssetCache asscache, SceneManager sman, UserProfileCacheService userv)
- : base(servers_info, httpServe, asscache, sman)
+ public HGGridServicesGridMode(NetworkServersInfo servers_info,
+ SceneManager sman, UserProfileCacheService userv)
+ : base(servers_info, sman)
{
- m_remoteBackend = new OGS1GridServices(servers_info, httpServe);
+ m_remoteBackend = new OGS1GridServices(servers_info);
m_userProfileCache = userv;
}
diff --git a/OpenSim/Region/Communications/Hypergrid/HGGridServicesStandalone.cs b/OpenSim/Region/Communications/Hypergrid/HGGridServicesStandalone.cs
index e1958533f9..828d0d971e 100644
--- a/OpenSim/Region/Communications/Hypergrid/HGGridServicesStandalone.cs
+++ b/OpenSim/Region/Communications/Hypergrid/HGGridServicesStandalone.cs
@@ -77,12 +77,12 @@ namespace OpenSim.Region.Communications.Hypergrid
public HGGridServicesStandalone(NetworkServersInfo servers_info, BaseHttpServer httpServe, IAssetCache asscache, SceneManager sman)
- : base(servers_info, httpServe, asscache, sman)
+ : base(servers_info, sman)
{
//Respond to Grid Services requests
- httpServer.AddXmlRPCHandler("logoff_user", LogOffUser);
- httpServer.AddXmlRPCHandler("check", PingCheckReply);
- httpServer.AddXmlRPCHandler("land_data", LandData);
+ MainServer.Instance.AddXmlRPCHandler("logoff_user", LogOffUser);
+ MainServer.Instance.AddXmlRPCHandler("check", PingCheckReply);
+ MainServer.Instance.AddXmlRPCHandler("land_data", LandData);
}
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
index ac3d64ec74..ceab75b2fb 100644
--- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
+++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
@@ -31,7 +31,6 @@ using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Communications.Osp;
-using OpenSim.Framework.Servers.HttpServer;
namespace OpenSim.Region.Communications.Local
{
@@ -40,11 +39,8 @@ namespace OpenSim.Region.Communications.Local
public CommunicationsLocal(
ConfigSettings configSettings,
NetworkServersInfo serversInfo,
- BaseHttpServer httpServer,
- IAssetCache assetCache,
- LibraryRootFolder libraryRootFolder,
- bool dumpAssetsToFile)
- : base(serversInfo, httpServer, assetCache, dumpAssetsToFile, libraryRootFolder)
+ LibraryRootFolder libraryRootFolder)
+ : base(serversInfo, libraryRootFolder)
{
LocalInventoryService inventoryService = new LocalInventoryService();
List plugins
diff --git a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs
index 03779c5ff2..323f8132ef 100644
--- a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs
+++ b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs
@@ -35,11 +35,11 @@ namespace OpenSim.Region.Communications.OGS1
public class CommunicationsOGS1 : CommunicationsManager
{
public CommunicationsOGS1(
- NetworkServersInfo serversInfo, BaseHttpServer httpServer,
- IAssetCache assetCache, LibraryRootFolder libraryRootFolder)
- : base(serversInfo, httpServer, assetCache, false, libraryRootFolder)
+ NetworkServersInfo serversInfo,
+ LibraryRootFolder libraryRootFolder)
+ : base(serversInfo, libraryRootFolder)
{
- OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo, httpServer);
+ OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo);
m_gridService = gridInterComms;
if (serversInfo.secureInventoryServer)
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index a526bb2db9..9ba84a7038 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -59,7 +59,6 @@ namespace OpenSim.Region.Communications.OGS1
public BaseHttpServer httpListener;
public NetworkServersInfo serversInfo;
- public BaseHttpServer httpServer;
public string gdebugRegionName
{
@@ -85,19 +84,12 @@ namespace OpenSim.Region.Communications.OGS1
///
///
///
- public OGS1GridServices(NetworkServersInfo servers_info, BaseHttpServer httpServe)
+ public OGS1GridServices(NetworkServersInfo servers_info)
{
serversInfo = servers_info;
- httpServer = httpServe;
//Respond to Grid Services requests
- // httpServer.AddXmlRPCHandler("expect_user", ExpectUser);
- // httpServer.AddXmlRPCHandler("logoff_user", LogOffUser);
- httpServer.AddXmlRPCHandler("check", PingCheckReply);
-
- // Retired into the new service connectors, 6/14/09
- //httpServer.AddXmlRPCHandler("land_data", LandData);
-
+ MainServer.Instance.AddXmlRPCHandler("check", PingCheckReply);
}
// see IGridServices
diff --git a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
index ad2c7aa0f4..0c7882a3bd 100644
--- a/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/Capabilities/CapabilitiesModule.cs
@@ -103,8 +103,8 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
Caps caps
= new Caps(
- m_scene.AssetService, m_scene.CommsManager.HttpServer, m_scene.RegionInfo.ExternalHostName,
- m_scene.CommsManager.HttpServer.Port,
+ m_scene.AssetService, MainServer.Instance, m_scene.RegionInfo.ExternalHostName,
+ MainServer.Instance.Port,
capsObjectPath, agentId, m_scene.DumpAssetsToFile, m_scene.RegionInfo.RegionName);
caps.RegisterHandlers();
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
index 52d0948613..b6250a220b 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
@@ -117,8 +117,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
{
if (m_scenes.Count == 0)
{
- scene.CommsManager.HttpServer.AddXmlRPCHandler("presence_update_bulk", processPresenceUpdateBulk);
- scene.CommsManager.HttpServer.AddXmlRPCHandler("terminate_friend", processTerminateFriend);
+ MainServer.Instance.AddXmlRPCHandler("presence_update_bulk", processPresenceUpdateBulk);
+ MainServer.Instance.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/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
index 70fbcd49ac..5e7cf4b1c9 100644
--- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
{
if (m_Scenes.Count == 0)
{
- scene.CommsManager.HttpServer.AddXmlRPCHandler(
+ MainServer.Instance.AddXmlRPCHandler(
"grid_instant_message", processXMLRPCGridInstantMessage);
}
diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs
index f98a9ff7c0..81ea267932 100644
--- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs
@@ -226,7 +226,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
foreach (UUID ky in removeitems)
{
m_AvatarQueueUUIDMapping.Remove(ky);
- m_scene.CommsManager.HttpServer.RemoveHTTPHandler("","/CAPS/EQG/" + ky.ToString() + "/");
+ MainServer.Instance.RemoveHTTPHandler("","/CAPS/EQG/" + ky.ToString() + "/");
}
}
@@ -315,7 +315,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue
}));
// This will persist this beyond the expiry of the caps handlers
- m_scene.CommsManager.HttpServer.AddHTTPHandler(
+ MainServer.Instance.AddHTTPHandler(
capsBase + EventQueueGetUUID.ToString() + "/", EventQueuePath2);
Random rnd = new Random(Environment.TickCount);
diff --git a/OpenSim/Region/CoreModules/Framework/Services/RegionMapService.cs b/OpenSim/Region/CoreModules/Framework/Services/RegionMapService.cs
index b9002198b5..8c92727041 100644
--- a/OpenSim/Region/CoreModules/Framework/Services/RegionMapService.cs
+++ b/OpenSim/Region/CoreModules/Framework/Services/RegionMapService.cs
@@ -124,7 +124,7 @@ namespace OpenSim.Region.CoreModules.Framework.Services
// IAssetDataPlugin m_assetProvider
// = ((AssetServerBase)m_scene.CommsManager.AssetCache.AssetServer).AssetProviderPlugin;
- IHttpServer httpServer = m_scene.CommsManager.HttpServer;
+ IHttpServer httpServer = MainServer.Instance;
httpServer.AddXmlRPCHandler("simulator_data_request", XmlRpcSimulatorDataRequestMethod);
//m_httpServer.AddXmlRPCHandler("map_block", XmlRpcMapBlockMethod);
//m_httpServer.AddXmlRPCHandler("search_for_region_by_name", XmlRpcSearchForRegionMethod);
diff --git a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs
index 08e1ecdb6f..a5894c6d5a 100644
--- a/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs
+++ b/OpenSim/Region/CoreModules/Hypergrid/HGStandaloneLoginModule.cs
@@ -100,7 +100,7 @@ namespace OpenSim.Region.CoreModules.Hypergrid
//TODO: fix casting.
LibraryRootFolder rootFolder = m_firstScene.CommsManager.UserProfileCacheService.LibraryRoot as LibraryRootFolder;
- IHttpServer httpServer = m_firstScene.CommsManager.HttpServer;
+ IHttpServer httpServer = MainServer.Instance;
//TODO: fix the casting of the user service, maybe by registering the userManagerBase with scenes, or refactoring so we just need a IUserService reference
m_loginService
diff --git a/OpenSim/Region/CoreModules/InterGrid/OGSRadmin.cs b/OpenSim/Region/CoreModules/InterGrid/OGSRadmin.cs
index a20b5baa69..0f2ba324e0 100644
--- a/OpenSim/Region/CoreModules/InterGrid/OGSRadmin.cs
+++ b/OpenSim/Region/CoreModules/InterGrid/OGSRadmin.cs
@@ -89,7 +89,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
if (m_settings.Configs["Startup"].GetBoolean("gridmode", false))
{
m_com = m_scenes[0].CommsManager;
- m_com.HttpServer.AddXmlRPCHandler("grid_message", GridWideMessage);
+ MainServer.Instance.AddXmlRPCHandler("grid_message", GridWideMessage);
}
}
diff --git a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
index b357805b40..bcf20bee97 100644
--- a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
+++ b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs
@@ -143,8 +143,8 @@ namespace OpenSim.Region.CoreModules.InterGrid
{
if (m_scene.Count == 0)
{
- scene.CommsManager.HttpServer.AddLLSDHandler("/agent/", ProcessAgentDomainMessage);
- scene.CommsManager.HttpServer.AddLLSDHandler("/", ProcessRegionDomainSeed);
+ MainServer.Instance.AddLLSDHandler("/agent/", ProcessAgentDomainMessage);
+ MainServer.Instance.AddLLSDHandler("/", ProcessRegionDomainSeed);
try
{
ServicePointManager.ServerCertificateValidationCallback += customXertificateValidation;
@@ -169,7 +169,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
// a zero length region name would conflict with are base region seed cap
if (!SceneListDuplicateCheck(scene.RegionInfo.RegionName) && scene.RegionInfo.RegionName.ToLower() != "agent" && scene.RegionInfo.RegionName.Length > 0)
{
- scene.CommsManager.HttpServer.AddLLSDHandler(
+ MainServer.Instance.AddLLSDHandler(
"/" + HttpUtility.UrlPathEncode(scene.RegionInfo.RegionName.ToLower()),
ProcessRegionDomainSeed);
}
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
index 5cb1f7d389..50d3fbea77 100644
--- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
@@ -93,7 +93,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
{
// There can only be one
//
- m_HttpServer = scene.CommsManager.HttpServer;
+ m_HttpServer = MainServer.Instance;
}
scene.RegisterModuleInterface(this);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs
index 70365882bb..3d7decce3e 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Asset/AssetServiceInConnectorModule.cs
@@ -93,7 +93,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Asset
m_log.Info("[RegionAssetService]: Starting...");
- Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer };
+ Object[] args = new Object[] { m_Config, MainServer.Instance };
ServerUtils.LoadPlugin("OpenSim.Server.Handlers.dll:AssetServiceConnector", args);
}
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/HGAuthServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/HGAuthServiceInConnectorModule.cs
index b3b4320c9e..a991393b23 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/HGAuthServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Authentication/HGAuthServiceInConnectorModule.cs
@@ -94,7 +94,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Authentication
if (!m_Registered)
{
m_Registered = true;
- new HGAuthServiceInConnector(m_Config, scene.CommsManager.HttpServer);
+ new HGAuthServiceInConnector(m_Config, MainServer.Instance);
//Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer };
//ServerUtils.LoadPlugin("OpenSim.Server.Handlers.dll:HGAuthServiceInConnector", args);
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs
index 480500a8ae..0ed7464aa3 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Inventory/InventoryServiceInConnectorModule.cs
@@ -93,7 +93,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Inventory
m_log.Info("[RegionInventoryService]: Starting...");
- Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer };
+ Object[] args = new Object[] { m_Config, MainServer.Instance };
ServerUtils.LoadPlugin("OpenSim.Server.Handlers.dll:InventoryServiceInConnector", args);
}
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs
index a3b2440503..213a769ce8 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Land/LandServiceInConnectorModule.cs
@@ -94,7 +94,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Land
if (!m_Registered)
{
m_Registered = true;
- Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer, this, scene };
+ Object[] args = new Object[] { m_Config, MainServer.Instance, this, scene };
ServerUtils.LoadPlugin("OpenSim.Server.Handlers.dll:LandServiceInConnector", args);
}
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs
index a6c2e7c506..f283c891a1 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Neighbour/NeighbourServiceInConnectorModule.cs
@@ -94,7 +94,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Neighbour
if (!m_Registered)
{
m_Registered = true;
- Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer, this, scene };
+ Object[] args = new Object[] { m_Config, MainServer.Instance, this, scene };
ServerUtils.LoadPlugin("OpenSim.Server.Handlers.dll:NeighbourServiceInConnector", args);
}
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs
index 151b455b74..9e7e10dc0d 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Simulation/SimulationServiceInConnectorModule.cs
@@ -93,7 +93,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Simulation
m_log.Info("[SIM SERVICE]: Starting...");
- Object[] args = new Object[] { m_Config, scene.CommsManager.HttpServer, scene };
+ Object[] args = new Object[] { m_Config, MainServer.Instance, scene };
ServerUtils.LoadPlugin("OpenSim.Server.Handlers.dll:SimulationServiceInConnector", args);
}
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs
index 05cc824578..7f9167db3d 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Interregion/RESTInterregionComms.cs
@@ -128,8 +128,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Interregion
protected virtual void AddHTTPHandlers()
{
- m_aScene.CommsManager.HttpServer.AddHTTPHandler("/agent/", AgentHandler);
- m_aScene.CommsManager.HttpServer.AddHTTPHandler("/object/", ObjectHandler);
+ MainServer.Instance.AddHTTPHandler("/agent/", AgentHandler);
+ MainServer.Instance.AddHTTPHandler("/object/", ObjectHandler);
}
#endregion /* IRegionModule */
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index 16c02a3d24..cf04fc8f25 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -144,8 +144,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
regionimage = regionimage.Replace("-", "");
m_log.Info("[WORLD MAP]: JPEG Map location: http://" + m_scene.RegionInfo.ExternalEndPoint.Address.ToString() + ":" + m_scene.RegionInfo.HttpPort.ToString() + "/index.php?method=" + regionimage);
- m_scene.CommsManager.HttpServer.AddHTTPHandler(regionimage, OnHTTPGetMapImage);
- m_scene.CommsManager.HttpServer.AddLLSDHandler(
+ MainServer.Instance.AddHTTPHandler(regionimage, OnHTTPGetMapImage);
+ MainServer.Instance.AddLLSDHandler(
"/MAP/MapItems/" + m_scene.RegionInfo.RegionHandle.ToString(), HandleRemoteMapItemRequest);
m_scene.EventManager.OnRegisterCaps += OnRegisterCaps;
@@ -166,9 +166,9 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString();
regionimage = regionimage.Replace("-", "");
- m_scene.CommsManager.HttpServer.RemoveLLSDHandler("/MAP/MapItems/" + m_scene.RegionInfo.RegionHandle.ToString(),
+ MainServer.Instance.RemoveLLSDHandler("/MAP/MapItems/" + m_scene.RegionInfo.RegionHandle.ToString(),
HandleRemoteMapItemRequest);
- m_scene.CommsManager.HttpServer.RemoveHTTPHandler("", regionimage);
+ MainServer.Instance.RemoveHTTPHandler("", regionimage);
}
public void OnRegisterCaps(UUID agentID, Caps caps)
diff --git a/OpenSim/Region/DataSnapshot/DataRequestHandler.cs b/OpenSim/Region/DataSnapshot/DataRequestHandler.cs
index ed5c9ece54..964e4b9d28 100644
--- a/OpenSim/Region/DataSnapshot/DataRequestHandler.cs
+++ b/OpenSim/Region/DataSnapshot/DataRequestHandler.cs
@@ -31,6 +31,7 @@ using System.Reflection;
using System.Xml;
using log4net;
using OpenMetaverse;
+using OpenSim.Framework;
using OpenSim.Framework.Capabilities;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Servers.HttpServer;
@@ -53,7 +54,7 @@ namespace OpenSim.Region.DataSnapshot
m_externalData = externalData;
//Register HTTP handler
- if (m_scene.CommsManager.HttpServer.AddHTTPHandler("collector", OnGetSnapshot))
+ if (MainServer.Instance.AddHTTPHandler("collector", OnGetSnapshot))
{
m_log.Info("[DATASNAPSHOT]: Set up snapshot service");
}
diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCBridgeModule.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCBridgeModule.cs
index b17a7e1900..0c696e3fee 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCBridgeModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCBridgeModule.cs
@@ -90,7 +90,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
{
m_log.InfoFormat("[IRC-Bridge] Connecting region {0}", scene.RegionInfo.RegionName);
if (!String.IsNullOrEmpty(m_password))
- scene.CommsManager.HttpServer.AddXmlRPCHandler("irc_admin", XmlRpcAdminMethod, false);
+ MainServer.Instance.AddXmlRPCHandler("irc_admin", XmlRpcAdminMethod, false);
m_region = new RegionState(scene, m_config);
lock (m_regions) m_regions.Add(m_region);
m_region.Open();
@@ -121,7 +121,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat
return;
if (!String.IsNullOrEmpty(m_password))
- scene.CommsManager.HttpServer.RemoveXmlRPCHandler("irc_admin");
+ MainServer.Instance.RemoveXmlRPCHandler("irc_admin");
m_region.Close();
diff --git a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs
index 6ef30c4703..96b68882c4 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs
@@ -144,7 +144,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
{
if (!m_enabled) return;
- scene.CommsManager.HttpServer.AddXmlRPCHandler("concierge_update_welcome", XmlRpcUpdateWelcomeMethod, false);
+ MainServer.Instance.AddXmlRPCHandler("concierge_update_welcome", XmlRpcUpdateWelcomeMethod, false);
lock (m_syncy)
{
@@ -176,7 +176,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge
{
if (!m_enabled) return;
- scene.CommsManager.HttpServer.RemoveXmlRPCHandler("concierge_update_welcome");
+ MainServer.Instance.RemoveXmlRPCHandler("concierge_update_welcome");
lock (m_syncy)
{
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
index 469ac2fcbd..5c562acf3b 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs
@@ -170,31 +170,31 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice
// - signout: viv_signout.php
if (UseProxy)
{
- scene.CommsManager.HttpServer.AddHTTPHandler(String.Format("{0}/", m_freeSwitchAPIPrefix),
+ MainServer.Instance.AddHTTPHandler(String.Format("{0}/", m_freeSwitchAPIPrefix),
ForwardProxyRequest);
}
else
{
- scene.CommsManager.HttpServer.AddHTTPHandler(String.Format("{0}/viv_get_prelogin.php", m_freeSwitchAPIPrefix),
+ MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_get_prelogin.php", m_freeSwitchAPIPrefix),
FreeSwitchSLVoiceGetPreloginHTTPHandler);
// RestStreamHandler h = new
// RestStreamHandler("GET",
// String.Format("{0}/viv_get_prelogin.php", m_freeSwitchAPIPrefix), FreeSwitchSLVoiceGetPreloginHTTPHandler);
- // scene.CommsManager.HttpServer.AddStreamHandler(h);
+ // MainServer.Instance.AddStreamHandler(h);
- scene.CommsManager.HttpServer.AddHTTPHandler(String.Format("{0}/viv_signin.php", m_freeSwitchAPIPrefix),
+ MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_signin.php", m_freeSwitchAPIPrefix),
FreeSwitchSLVoiceSigninHTTPHandler);
// set up http request handlers to provide
// on-demand FreeSwitch configuration to
// FreeSwitch's mod_curl_xml
- scene.CommsManager.HttpServer.AddHTTPHandler(String.Format("{0}/freeswitch-config", m_freeSwitchAPIPrefix),
+ MainServer.Instance.AddHTTPHandler(String.Format("{0}/freeswitch-config", m_freeSwitchAPIPrefix),
FreeSwitchConfigHTTPHandler);
- scene.CommsManager.HttpServer.AddHTTPHandler(String.Format("{0}/viv_buddy.php", m_freeSwitchAPIPrefix),
+ MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_buddy.php", m_freeSwitchAPIPrefix),
FreeSwitchSLVoiceBuddyHTTPHandler);
}
diff --git a/OpenSim/Region/ReplaceableModules/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/ReplaceableModules/MoneyModule/SampleMoneyModule.cs
index 6251293645..c4fd4bccd1 100644
--- a/OpenSim/Region/ReplaceableModules/MoneyModule/SampleMoneyModule.cs
+++ b/OpenSim/Region/ReplaceableModules/MoneyModule/SampleMoneyModule.cs
@@ -124,7 +124,7 @@ namespace OpenSim.Region.ReplaceableModules.MoneyModule
if (m_enabled)
{
scene.RegisterModuleInterface(this);
- IHttpServer httpServer = scene.CommsManager.HttpServer;
+ IHttpServer httpServer = MainServer.Instance;
lock (m_scenel)
{
diff --git a/OpenSim/Region/UserStatistics/WebStatsModule.cs b/OpenSim/Region/UserStatistics/WebStatsModule.cs
index 4f6fcce6af..0807607893 100644
--- a/OpenSim/Region/UserStatistics/WebStatsModule.cs
+++ b/OpenSim/Region/UserStatistics/WebStatsModule.cs
@@ -127,8 +127,8 @@ namespace OpenSim.Region.UserStatistics
////
- scene.CommsManager.HttpServer.AddHTTPHandler("/SStats/", HandleStatsRequest);
- scene.CommsManager.HttpServer.AddHTTPHandler("/CAPS/VS/", HandleUnknownCAPSRequest);
+ MainServer.Instance.AddHTTPHandler("/SStats/", HandleStatsRequest);
+ MainServer.Instance.AddHTTPHandler("/CAPS/VS/", HandleUnknownCAPSRequest);
}
m_scene.Add(scene);
@@ -236,7 +236,7 @@ namespace OpenSim.Region.UserStatistics
}
else
{
- strOut = m_scene[0].CommsManager.HttpServer.GetHTTP404("");
+ strOut = MainServer.Instance.GetHTTP404("");
}
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
index eb83ee60c3..87751a4fa4 100644
--- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
+++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Tests.Common.Mock
}
public TestCommunicationsManager(NetworkServersInfo serversInfo)
- : base(serversInfo, new BaseHttpServer(666), null, false, null)
+ : base(serversInfo, null)
{
LocalInventoryService lis = new LocalInventoryService();
m_inventoryDataPlugin = new TestInventoryDataPlugin();