diff options
author | Melanie | 2010-08-04 00:33:02 +0100 |
---|---|---|
committer | Melanie | 2010-08-04 00:33:02 +0100 |
commit | e12993ed22d59375bc9d0aa17230c74eeb4ccda3 (patch) | |
tree | 4b98affa74715dbad24b34a31d4abe22f1ff2990 | |
parent | Allow specifying default region flags. Correct a typo. (diff) | |
parent | Allow specifying default region flags. Correct a typo. (diff) | |
download | opensim-SC-e12993ed22d59375bc9d0aa17230c74eeb4ccda3.zip opensim-SC-e12993ed22d59375bc9d0aa17230c74eeb4ccda3.tar.gz opensim-SC-e12993ed22d59375bc9d0aa17230c74eeb4ccda3.tar.bz2 opensim-SC-e12993ed22d59375bc9d0aa17230c74eeb4ccda3.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/HypergridService/GatekeeperService.cs | 103 | ||||
-rw-r--r-- | OpenSim/Services/HypergridService/UserAgentService.cs | 16 | ||||
-rw-r--r-- | bin/Robust.HG.ini.example | 1 | ||||
-rw-r--r-- | bin/config-include/StandaloneHypergrid.ini | 2 |
4 files changed, 66 insertions, 56 deletions
diff --git a/OpenSim/Services/HypergridService/GatekeeperService.cs b/OpenSim/Services/HypergridService/GatekeeperService.cs index c5cfe75..3fc9327 100644 --- a/OpenSim/Services/HypergridService/GatekeeperService.cs +++ b/OpenSim/Services/HypergridService/GatekeeperService.cs | |||
@@ -49,61 +49,64 @@ namespace OpenSim.Services.HypergridService | |||
49 | LogManager.GetLogger( | 49 | LogManager.GetLogger( |
50 | MethodBase.GetCurrentMethod().DeclaringType); | 50 | MethodBase.GetCurrentMethod().DeclaringType); |
51 | 51 | ||
52 | IGridService m_GridService; | 52 | private static bool m_Initialized = false; |
53 | IPresenceService m_PresenceService; | ||
54 | IUserAccountService m_UserAccountService; | ||
55 | IUserAgentService m_UserAgentService; | ||
56 | ISimulationService m_SimulationService; | ||
57 | 53 | ||
58 | string m_AuthDll; | 54 | private static IGridService m_GridService; |
55 | private static IPresenceService m_PresenceService; | ||
56 | private static IUserAccountService m_UserAccountService; | ||
57 | private static IUserAgentService m_UserAgentService; | ||
58 | private static ISimulationService m_SimulationService; | ||
59 | 59 | ||
60 | UUID m_ScopeID; | 60 | private static UUID m_ScopeID; |
61 | bool m_AllowTeleportsToAnyRegion; | 61 | private static bool m_AllowTeleportsToAnyRegion; |
62 | string m_ExternalName; | 62 | private static string m_ExternalName; |
63 | GridRegion m_DefaultGatewayRegion; | 63 | private static GridRegion m_DefaultGatewayRegion; |
64 | 64 | ||
65 | public GatekeeperService(IConfigSource config, ISimulationService simService) | 65 | public GatekeeperService(IConfigSource config, ISimulationService simService) |
66 | { | 66 | { |
67 | IConfig serverConfig = config.Configs["GatekeeperService"]; | 67 | if (!m_Initialized) |
68 | if (serverConfig == null) | 68 | { |
69 | throw new Exception(String.Format("No section GatekeeperService in config file")); | 69 | m_Initialized = true; |
70 | 70 | ||
71 | string accountService = serverConfig.GetString("UserAccountService", String.Empty); | 71 | IConfig serverConfig = config.Configs["GatekeeperService"]; |
72 | string homeUsersService = serverConfig.GetString("HomeUsersSecurityService", string.Empty); | 72 | if (serverConfig == null) |
73 | string gridService = serverConfig.GetString("GridService", String.Empty); | 73 | throw new Exception(String.Format("No section GatekeeperService in config file")); |
74 | string presenceService = serverConfig.GetString("PresenceService", String.Empty); | 74 | |
75 | string simulationService = serverConfig.GetString("SimulationService", String.Empty); | 75 | string accountService = serverConfig.GetString("UserAccountService", String.Empty); |
76 | 76 | string homeUsersService = serverConfig.GetString("HomeUsersSecurityService", string.Empty); | |
77 | //m_AuthDll = serverConfig.GetString("AuthenticationService", String.Empty); | 77 | string gridService = serverConfig.GetString("GridService", String.Empty); |
78 | 78 | string presenceService = serverConfig.GetString("PresenceService", String.Empty); | |
79 | // These 3 are mandatory, the others aren't | 79 | string simulationService = serverConfig.GetString("SimulationService", String.Empty); |
80 | if (gridService == string.Empty || presenceService == string.Empty || m_AuthDll == string.Empty) | 80 | |
81 | throw new Exception("Incomplete specifications, Gatekeeper Service cannot function."); | 81 | // These 3 are mandatory, the others aren't |
82 | 82 | if (gridService == string.Empty || presenceService == string.Empty) | |
83 | string scope = serverConfig.GetString("ScopeID", UUID.Zero.ToString()); | 83 | throw new Exception("Incomplete specifications, Gatekeeper Service cannot function."); |
84 | UUID.TryParse(scope, out m_ScopeID); | 84 | |
85 | //m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!"); | 85 | string scope = serverConfig.GetString("ScopeID", UUID.Zero.ToString()); |
86 | m_AllowTeleportsToAnyRegion = serverConfig.GetBoolean("AllowTeleportsToAnyRegion", true); | 86 | UUID.TryParse(scope, out m_ScopeID); |
87 | m_ExternalName = serverConfig.GetString("ExternalName", string.Empty); | 87 | //m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!"); |
88 | 88 | m_AllowTeleportsToAnyRegion = serverConfig.GetBoolean("AllowTeleportsToAnyRegion", true); | |
89 | Object[] args = new Object[] { config }; | 89 | m_ExternalName = serverConfig.GetString("ExternalName", string.Empty); |
90 | m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args); | 90 | |
91 | m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args); | 91 | Object[] args = new Object[] { config }; |
92 | 92 | m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args); | |
93 | if (accountService != string.Empty) | 93 | m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args); |
94 | m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args); | 94 | |
95 | if (homeUsersService != string.Empty) | 95 | if (accountService != string.Empty) |
96 | m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(homeUsersService, args); | 96 | m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(accountService, args); |
97 | 97 | if (homeUsersService != string.Empty) | |
98 | if (simService != null) | 98 | m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(homeUsersService, args); |
99 | m_SimulationService = simService; | 99 | |
100 | else if (simulationService != string.Empty) | 100 | if (simService != null) |
101 | m_SimulationService = ServerUtils.LoadPlugin<ISimulationService>(simulationService, args); | 101 | m_SimulationService = simService; |
102 | 102 | else if (simulationService != string.Empty) | |
103 | if (m_GridService == null || m_PresenceService == null || m_SimulationService == null) | 103 | m_SimulationService = ServerUtils.LoadPlugin<ISimulationService>(simulationService, args); |
104 | throw new Exception("Unable to load a required plugin, Gatekeeper Service cannot function."); | 104 | |
105 | 105 | if (m_GridService == null || m_PresenceService == null || m_SimulationService == null) | |
106 | m_log.Debug("[GATEKEEPER SERVICE]: Starting..."); | 106 | throw new Exception("Unable to load a required plugin, Gatekeeper Service cannot function."); |
107 | |||
108 | m_log.Debug("[GATEKEEPER SERVICE]: Starting..."); | ||
109 | } | ||
107 | } | 110 | } |
108 | 111 | ||
109 | public GatekeeperService(IConfigSource config) | 112 | public GatekeeperService(IConfigSource config) |
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index aec82e8..4bee4b5 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs | |||
@@ -61,7 +61,8 @@ namespace OpenSim.Services.HypergridService | |||
61 | 61 | ||
62 | protected static IGridUserService m_GridUserService; | 62 | protected static IGridUserService m_GridUserService; |
63 | protected static IGridService m_GridService; | 63 | protected static IGridService m_GridService; |
64 | protected static GatekeeperServiceConnector m_GatekeeperConnector; | 64 | //protected static GatekeeperServiceConnector m_GatekeeperConnector; |
65 | protected static IGatekeeperService m_GatekeeperService; | ||
65 | 66 | ||
66 | protected static bool m_BypassClientVerification; | 67 | protected static bool m_BypassClientVerification; |
67 | 68 | ||
@@ -69,6 +70,8 @@ namespace OpenSim.Services.HypergridService | |||
69 | { | 70 | { |
70 | if (!m_Initialized) | 71 | if (!m_Initialized) |
71 | { | 72 | { |
73 | m_Initialized = true; | ||
74 | |||
72 | m_log.DebugFormat("[HOME USERS SECURITY]: Starting..."); | 75 | m_log.DebugFormat("[HOME USERS SECURITY]: Starting..."); |
73 | 76 | ||
74 | IConfig serverConfig = config.Configs["UserAgentService"]; | 77 | IConfig serverConfig = config.Configs["UserAgentService"]; |
@@ -77,18 +80,18 @@ namespace OpenSim.Services.HypergridService | |||
77 | 80 | ||
78 | string gridService = serverConfig.GetString("GridService", String.Empty); | 81 | string gridService = serverConfig.GetString("GridService", String.Empty); |
79 | string gridUserService = serverConfig.GetString("GridUserService", String.Empty); | 82 | string gridUserService = serverConfig.GetString("GridUserService", String.Empty); |
83 | string gatekeeperService = serverConfig.GetString("GatekeeperService", String.Empty); | ||
80 | 84 | ||
81 | m_BypassClientVerification = serverConfig.GetBoolean("BypassClientVerification", false); | 85 | m_BypassClientVerification = serverConfig.GetBoolean("BypassClientVerification", false); |
82 | 86 | ||
83 | if (gridService == string.Empty || gridUserService == string.Empty) | 87 | if (gridService == string.Empty || gridUserService == string.Empty || gatekeeperService == string.Empty) |
84 | throw new Exception(String.Format("Incomplete specifications, UserAgent Service cannot function.")); | 88 | throw new Exception(String.Format("Incomplete specifications, UserAgent Service cannot function.")); |
85 | 89 | ||
86 | Object[] args = new Object[] { config }; | 90 | Object[] args = new Object[] { config }; |
87 | m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args); | 91 | m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args); |
88 | m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args); | 92 | m_GridUserService = ServerUtils.LoadPlugin<IGridUserService>(gridUserService, args); |
89 | m_GatekeeperConnector = new GatekeeperServiceConnector(); | 93 | //m_GatekeeperConnector = new GatekeeperServiceConnector(); |
90 | 94 | m_GatekeeperService = ServerUtils.LoadPlugin<IGatekeeperService>(gatekeeperService, args); | |
91 | m_Initialized = true; | ||
92 | } | 95 | } |
93 | } | 96 | } |
94 | 97 | ||
@@ -135,7 +138,8 @@ namespace OpenSim.Services.HypergridService | |||
135 | agentCircuit.ServiceSessionID = "http://" + region.ExternalHostName + ":" + region.HttpPort + ";" + UUID.Random(); | 138 | agentCircuit.ServiceSessionID = "http://" + region.ExternalHostName + ":" + region.HttpPort + ";" + UUID.Random(); |
136 | TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region); | 139 | TravelingAgentInfo old = UpdateTravelInfo(agentCircuit, region); |
137 | 140 | ||
138 | bool success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason); | 141 | //bool success = m_GatekeeperConnector.CreateAgent(region, agentCircuit, (uint)Constants.TeleportFlags.ViaLogin, out reason); |
142 | bool success = m_GatekeeperService.LoginAgent(agentCircuit, finalDestination, out reason); | ||
139 | 143 | ||
140 | if (!success) | 144 | if (!success) |
141 | { | 145 | { |
diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index 0cf9ab1..9269e39 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example | |||
@@ -207,6 +207,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 | |||
207 | ;; for the service | 207 | ;; for the service |
208 | GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService" | 208 | GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService" |
209 | GridService = "OpenSim.Services.GridService.dll:GridService" | 209 | GridService = "OpenSim.Services.GridService.dll:GridService" |
210 | GatekeeperService = "OpenSim.Services.HypergridService.dll:GatekeeperService" | ||
210 | 211 | ||
211 | ;; The interface that local users get when they are in other grids. | 212 | ;; The interface that local users get when they are in other grids. |
212 | ;; This restricts the inventory operations while in other grids. | 213 | ;; This restricts the inventory operations while in other grids. |
diff --git a/bin/config-include/StandaloneHypergrid.ini b/bin/config-include/StandaloneHypergrid.ini index e87270d..35e7da2 100644 --- a/bin/config-include/StandaloneHypergrid.ini +++ b/bin/config-include/StandaloneHypergrid.ini | |||
@@ -114,6 +114,8 @@ | |||
114 | ;; for the service | 114 | ;; for the service |
115 | GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService" | 115 | GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService" |
116 | GridService = "OpenSim.Services.GridService.dll:GridService" | 116 | GridService = "OpenSim.Services.GridService.dll:GridService" |
117 | GatekeeperService = "OpenSim.Services.HypergridService.dll:GatekeeperService" | ||
118 | |||
117 | 119 | ||
118 | ;; The interface that local users get when they are in other grids | 120 | ;; The interface that local users get when they are in other grids |
119 | ;; This greatly restricts the inventory operations while in other grids | 121 | ;; This greatly restricts the inventory operations while in other grids |