aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers
diff options
context:
space:
mode:
authorMelanie2009-09-29 09:56:17 +0100
committerMelanie2009-09-29 09:56:17 +0100
commit691f1e8aa08db84b689793ea9cd2c72bcfdd9b17 (patch)
treebccc5f146d169c14615384d60d94f1ae3f79f354 /OpenSim/Server/Handlers
parentFixed a bug that was causing exceptions to the thrown in ROBUST MainServer. (diff)
downloadopensim-SC_OLD-691f1e8aa08db84b689793ea9cd2c72bcfdd9b17.zip
opensim-SC_OLD-691f1e8aa08db84b689793ea9cd2c72bcfdd9b17.tar.gz
opensim-SC_OLD-691f1e8aa08db84b689793ea9cd2c72bcfdd9b17.tar.bz2
opensim-SC_OLD-691f1e8aa08db84b689793ea9cd2c72bcfdd9b17.tar.xz
Fix loading modules with alternate configurations and ports into ROBUST.
Make all current modules support the configuration name option
Diffstat (limited to 'OpenSim/Server/Handlers')
-rw-r--r--OpenSim/Server/Handlers/Asset/AssetServerConnector.cs13
-rw-r--r--OpenSim/Server/Handlers/Authentication/AuthenticationServerConnector.cs12
-rw-r--r--OpenSim/Server/Handlers/Authorization/AuthorizationServerConnector.cs11
-rw-r--r--OpenSim/Server/Handlers/Base/ServerConnector.cs2
-rw-r--r--OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs14
-rw-r--r--OpenSim/Server/Handlers/Grid/GridServerConnector.cs11
-rw-r--r--OpenSim/Server/Handlers/Grid/HypergridServerConnector.cs2
-rw-r--r--OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs11
-rw-r--r--OpenSim/Server/Handlers/Land/LandServiceInConnector.cs2
-rw-r--r--OpenSim/Server/Handlers/Neighbour/NeighbourServiceInConnector.cs2
-rw-r--r--OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs2
11 files changed, 49 insertions, 33 deletions
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs b/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs
index 7c74e05..f7eb292 100644
--- a/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs
+++ b/OpenSim/Server/Handlers/Asset/AssetServerConnector.cs
@@ -37,13 +37,17 @@ namespace OpenSim.Server.Handlers.Asset
37 public class AssetServiceConnector : ServiceConnector 37 public class AssetServiceConnector : ServiceConnector
38 { 38 {
39 private IAssetService m_AssetService; 39 private IAssetService m_AssetService;
40 private string m_ConfigName = "AssetService";
40 41
41 public AssetServiceConnector(IConfigSource config, IHttpServer server) : 42 public AssetServiceConnector(IConfigSource config, IHttpServer server, string configName) :
42 base(config, server) 43 base(config, server, configName)
43 { 44 {
44 IConfig serverConfig = config.Configs["AssetService"]; 45 if (configName != String.Empty)
46 m_ConfigName = configName;
47
48 IConfig serverConfig = config.Configs[m_ConfigName];
45 if (serverConfig == null) 49 if (serverConfig == null)
46 throw new Exception("No section 'Server' in config file"); 50 throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
47 51
48 string assetService = serverConfig.GetString("LocalServiceModule", 52 string assetService = serverConfig.GetString("LocalServiceModule",
49 String.Empty); 53 String.Empty);
@@ -55,7 +59,6 @@ namespace OpenSim.Server.Handlers.Asset
55 m_AssetService = 59 m_AssetService =
56 ServerUtils.LoadPlugin<IAssetService>(assetService, args); 60 ServerUtils.LoadPlugin<IAssetService>(assetService, args);
57 61
58 //System.Console.WriteLine("XXXXXXXXXXXXXXXXXXX m_AssetSetvice == null? " + ((m_AssetService == null) ? "yes" : "no"));
59 server.AddStreamHandler(new AssetServerGetHandler(m_AssetService)); 62 server.AddStreamHandler(new AssetServerGetHandler(m_AssetService));
60 server.AddStreamHandler(new AssetServerPostHandler(m_AssetService)); 63 server.AddStreamHandler(new AssetServerPostHandler(m_AssetService));
61 server.AddStreamHandler(new AssetServerDeleteHandler(m_AssetService)); 64 server.AddStreamHandler(new AssetServerDeleteHandler(m_AssetService));
diff --git a/OpenSim/Server/Handlers/Authentication/AuthenticationServerConnector.cs b/OpenSim/Server/Handlers/Authentication/AuthenticationServerConnector.cs
index 589dc3b..2abef0a 100644
--- a/OpenSim/Server/Handlers/Authentication/AuthenticationServerConnector.cs
+++ b/OpenSim/Server/Handlers/Authentication/AuthenticationServerConnector.cs
@@ -37,13 +37,17 @@ namespace OpenSim.Server.Handlers.Authentication
37 public class AuthenticationServiceConnector : ServiceConnector 37 public class AuthenticationServiceConnector : ServiceConnector
38 { 38 {
39 private IAuthenticationService m_AuthenticationService; 39 private IAuthenticationService m_AuthenticationService;
40 private string m_ConfigName = "AuthenticationService";
40 41
41 public AuthenticationServiceConnector(IConfigSource config, IHttpServer server) : 42 public AuthenticationServiceConnector(IConfigSource config, IHttpServer server, string configName) :
42 base(config, server) 43 base(config, server, configName)
43 { 44 {
44 IConfig serverConfig = config.Configs["AuthenticationService"]; 45 if (configName != String.Empty)
46 m_ConfigName = configName;
47
48 IConfig serverConfig = config.Configs[m_ConfigName];
45 if (serverConfig == null) 49 if (serverConfig == null)
46 throw new Exception("No section 'Server' in config file"); 50 throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
47 51
48 string authenticationService = serverConfig.GetString("AuthenticationServiceModule", 52 string authenticationService = serverConfig.GetString("AuthenticationServiceModule",
49 String.Empty); 53 String.Empty);
diff --git a/OpenSim/Server/Handlers/Authorization/AuthorizationServerConnector.cs b/OpenSim/Server/Handlers/Authorization/AuthorizationServerConnector.cs
index 0d9f239..20fd0f7 100644
--- a/OpenSim/Server/Handlers/Authorization/AuthorizationServerConnector.cs
+++ b/OpenSim/Server/Handlers/Authorization/AuthorizationServerConnector.cs
@@ -37,13 +37,16 @@ namespace OpenSim.Server.Handlers.Authorization
37 public class AuthorizationServerConnector : ServiceConnector 37 public class AuthorizationServerConnector : ServiceConnector
38 { 38 {
39 private IAuthorizationService m_AuthorizationService; 39 private IAuthorizationService m_AuthorizationService;
40 private string m_ConfigName = "AuthorizationService";
40 41
41 public AuthorizationServerConnector(IConfigSource config, IHttpServer server) : 42 public AuthorizationServerConnector(IConfigSource config, IHttpServer server, string configName) :
42 base(config, server) 43 base(config, server, configName)
43 { 44 {
44 IConfig serverConfig = config.Configs["AuthorizationService"]; 45 if (configName != String.Empty)
46 m_ConfigName = configName;
47 IConfig serverConfig = config.Configs[m_ConfigName];
45 if (serverConfig == null) 48 if (serverConfig == null)
46 throw new Exception("No section 'Server' in config file"); 49 throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
47 50
48 string authorizationService = serverConfig.GetString("LocalServiceModule", 51 string authorizationService = serverConfig.GetString("LocalServiceModule",
49 String.Empty); 52 String.Empty);
diff --git a/OpenSim/Server/Handlers/Base/ServerConnector.cs b/OpenSim/Server/Handlers/Base/ServerConnector.cs
index 62fe773..71876da 100644
--- a/OpenSim/Server/Handlers/Base/ServerConnector.cs
+++ b/OpenSim/Server/Handlers/Base/ServerConnector.cs
@@ -39,7 +39,7 @@ namespace OpenSim.Server.Handlers.Base
39 39
40 public class ServiceConnector : IServiceConnector 40 public class ServiceConnector : IServiceConnector
41 { 41 {
42 public ServiceConnector(IConfigSource config, IHttpServer server) 42 public ServiceConnector(IConfigSource config, IHttpServer server, string configName)
43 { 43 {
44 } 44 }
45 } 45 }
diff --git a/OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs b/OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs
index a4ab0d3..07bafc8 100644
--- a/OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs
+++ b/OpenSim/Server/Handlers/Freeswitch/FreeswitchServerConnector.cs
@@ -37,19 +37,23 @@ namespace OpenSim.Server.Handlers.Freeswitch
37 public class FreeswitchServerConnector : ServiceConnector 37 public class FreeswitchServerConnector : ServiceConnector
38 { 38 {
39 private IFreeswitchService m_FreeswitchService; 39 private IFreeswitchService m_FreeswitchService;
40 private string m_ConfigName = "FreeswitchService";
40 41
41 public FreeswitchServerConnector(IConfigSource config, IHttpServer server) : 42 public FreeswitchServerConnector(IConfigSource config, IHttpServer server, string configName) :
42 base(config, server) 43 base(config, server, configName)
43 { 44 {
44 IConfig serverConfig = config.Configs["FreeswitchService"]; 45 if (configName != String.Empty)
46 m_ConfigName = configName;
47
48 IConfig serverConfig = config.Configs[m_ConfigName];
45 if (serverConfig == null) 49 if (serverConfig == null)
46 throw new Exception("No section 'Server' in config file"); 50 throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
47 51
48 string freeswitchService = serverConfig.GetString("LocalServiceModule", 52 string freeswitchService = serverConfig.GetString("LocalServiceModule",
49 String.Empty); 53 String.Empty);
50 54
51 if (freeswitchService == String.Empty) 55 if (freeswitchService == String.Empty)
52 throw new Exception("No FreeswitchService in config file"); 56 throw new Exception("No LocalServiceModule in config file");
53 57
54 Object[] args = new Object[] { config }; 58 Object[] args = new Object[] { config };
55 m_FreeswitchService = 59 m_FreeswitchService =
diff --git a/OpenSim/Server/Handlers/Grid/GridServerConnector.cs b/OpenSim/Server/Handlers/Grid/GridServerConnector.cs
index ebdf489..14daf12 100644
--- a/OpenSim/Server/Handlers/Grid/GridServerConnector.cs
+++ b/OpenSim/Server/Handlers/Grid/GridServerConnector.cs
@@ -37,19 +37,20 @@ namespace OpenSim.Server.Handlers.Grid
37 public class GridServiceConnector : ServiceConnector 37 public class GridServiceConnector : ServiceConnector
38 { 38 {
39 private IGridService m_GridService; 39 private IGridService m_GridService;
40 private string m_ConfigName = "GridService";
40 41
41 public GridServiceConnector(IConfigSource config, IHttpServer server) : 42 public GridServiceConnector(IConfigSource config, IHttpServer server, string configName) :
42 base(config, server) 43 base(config, server, configName)
43 { 44 {
44 IConfig serverConfig = config.Configs["GridService"]; 45 IConfig serverConfig = config.Configs[m_ConfigName];
45 if (serverConfig == null) 46 if (serverConfig == null)
46 throw new Exception("No section 'Server' in config file"); 47 throw new Exception(String.Format("No section {0} in config file", m_ConfigName));
47 48
48 string gridService = serverConfig.GetString("LocalServiceModule", 49 string gridService = serverConfig.GetString("LocalServiceModule",
49 String.Empty); 50 String.Empty);
50 51
51 if (gridService == String.Empty) 52 if (gridService == String.Empty)
52 throw new Exception("No GridService in config file"); 53 throw new Exception("No LocalServiceModule in config file");
53 54
54 Object[] args = new Object[] { config }; 55 Object[] args = new Object[] { config };
55 m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args); 56 m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
diff --git a/OpenSim/Server/Handlers/Grid/HypergridServerConnector.cs b/OpenSim/Server/Handlers/Grid/HypergridServerConnector.cs
index ad63485..e226759 100644
--- a/OpenSim/Server/Handlers/Grid/HypergridServerConnector.cs
+++ b/OpenSim/Server/Handlers/Grid/HypergridServerConnector.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Server.Handlers.Grid
51 private List<SimpleRegionInfo> m_RegionsOnSim = new List<SimpleRegionInfo>(); 51 private List<SimpleRegionInfo> m_RegionsOnSim = new List<SimpleRegionInfo>();
52 52
53 public HypergridServiceInConnector(IConfigSource config, IHttpServer server) : 53 public HypergridServiceInConnector(IConfigSource config, IHttpServer server) :
54 base(config, server) 54 base(config, server, String.Empty)
55 { 55 {
56 server.AddXmlRPCHandler("linkk_region", LinkRegionRequest, false); 56 server.AddXmlRPCHandler("linkk_region", LinkRegionRequest, false);
57 } 57 }
diff --git a/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs b/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs
index 998b322..ca45263 100644
--- a/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs
+++ b/OpenSim/Server/Handlers/Inventory/InventoryServerInConnector.cs
@@ -54,19 +54,20 @@ namespace OpenSim.Server.Handlers.Inventory
54 //private AuthedSessionCache m_session_cache = new AuthedSessionCache(INVENTORY_DEFAULT_SESSION_TIME); 54 //private AuthedSessionCache m_session_cache = new AuthedSessionCache(INVENTORY_DEFAULT_SESSION_TIME);
55 55
56 private string m_userserver_url; 56 private string m_userserver_url;
57 private string m_ConfigName = "InventoryService";
57 58
58 public InventoryServiceInConnector(IConfigSource config, IHttpServer server) : 59 public InventoryServiceInConnector(IConfigSource config, IHttpServer server, string configName) :
59 base(config, server) 60 base(config, server, configName)
60 { 61 {
61 IConfig serverConfig = config.Configs["InventoryService"]; 62 IConfig serverConfig = config.Configs[m_ConfigName];
62 if (serverConfig == null) 63 if (serverConfig == null)
63 throw new Exception("No section 'InventoryService' in config file"); 64 throw new Exception(String.Format("No section '{0}' in config file", m_ConfigName));
64 65
65 string inventoryService = serverConfig.GetString("LocalServiceModule", 66 string inventoryService = serverConfig.GetString("LocalServiceModule",
66 String.Empty); 67 String.Empty);
67 68
68 if (inventoryService == String.Empty) 69 if (inventoryService == String.Empty)
69 throw new Exception("No InventoryService in config file"); 70 throw new Exception("No LocalServiceModule in config file");
70 71
71 Object[] args = new Object[] { config }; 72 Object[] args = new Object[] { config };
72 m_InventoryService = 73 m_InventoryService =
diff --git a/OpenSim/Server/Handlers/Land/LandServiceInConnector.cs b/OpenSim/Server/Handlers/Land/LandServiceInConnector.cs
index 10e3b47..d368bd3 100644
--- a/OpenSim/Server/Handlers/Land/LandServiceInConnector.cs
+++ b/OpenSim/Server/Handlers/Land/LandServiceInConnector.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Server.Handlers.Land
46 // TODO : private IAuthenticationService m_AuthenticationService; 46 // TODO : private IAuthenticationService m_AuthenticationService;
47 47
48 public LandServiceInConnector(IConfigSource source, IHttpServer server, ILandService service, IScene scene) : 48 public LandServiceInConnector(IConfigSource source, IHttpServer server, ILandService service, IScene scene) :
49 base(source, server) 49 base(source, server, String.Empty)
50 { 50 {
51 m_LandService = service; 51 m_LandService = service;
52 if (m_LandService == null) 52 if (m_LandService == null)
diff --git a/OpenSim/Server/Handlers/Neighbour/NeighbourServiceInConnector.cs b/OpenSim/Server/Handlers/Neighbour/NeighbourServiceInConnector.cs
index b3a91cf..ac2e75f 100644
--- a/OpenSim/Server/Handlers/Neighbour/NeighbourServiceInConnector.cs
+++ b/OpenSim/Server/Handlers/Neighbour/NeighbourServiceInConnector.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Server.Handlers.Neighbour
46 private IAuthenticationService m_AuthenticationService = null; 46 private IAuthenticationService m_AuthenticationService = null;
47 47
48 public NeighbourServiceInConnector(IConfigSource source, IHttpServer server, INeighbourService nService, IScene scene) : 48 public NeighbourServiceInConnector(IConfigSource source, IHttpServer server, INeighbourService nService, IScene scene) :
49 base(source, server) 49 base(source, server, String.Empty)
50 { 50 {
51 51
52 m_NeighbourService = nService; 52 m_NeighbourService = nService;
diff --git a/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs b/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs
index 0bb4713..fe93fa5 100644
--- a/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs
+++ b/OpenSim/Server/Handlers/Simulation/SimulationServiceInConnector.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Server.Handlers.Simulation
41 private IAuthenticationService m_AuthenticationService; 41 private IAuthenticationService m_AuthenticationService;
42 42
43 public SimulationServiceInConnector(IConfigSource config, IHttpServer server, IScene scene) : 43 public SimulationServiceInConnector(IConfigSource config, IHttpServer server, IScene scene) :
44 base(config, server) 44 base(config, server, String.Empty)
45 { 45 {
46 IConfig serverConfig = config.Configs["SimulationService"]; 46 IConfig serverConfig = config.Configs["SimulationService"];
47 if (serverConfig == null) 47 if (serverConfig == null)