diff options
Diffstat (limited to 'OpenSim/Region/Application/OpenSimBase.cs')
-rw-r--r-- | OpenSim/Region/Application/OpenSimBase.cs | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index e5cf07a..d4fa314 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs | |||
@@ -84,7 +84,6 @@ namespace OpenSim | |||
84 | public bool m_gridLocalAsset; | 84 | public bool m_gridLocalAsset; |
85 | public bool m_see_into_region_from_neighbor; | 85 | public bool m_see_into_region_from_neighbor; |
86 | 86 | ||
87 | protected LocalLoginService m_loginService; | ||
88 | protected GridInfoService m_gridInfoService; | 87 | protected GridInfoService m_gridInfoService; |
89 | 88 | ||
90 | protected string m_storageDll; | 89 | protected string m_storageDll; |
@@ -368,6 +367,8 @@ namespace OpenSim | |||
368 | base.Startup(); | 367 | base.Startup(); |
369 | 368 | ||
370 | m_stats = StatsManager.StartCollectingSimExtraStats(); | 369 | m_stats = StatsManager.StartCollectingSimExtraStats(); |
370 | |||
371 | LibraryRootFolder libraryRootFolder = new LibraryRootFolder(); | ||
371 | 372 | ||
372 | // StandAlone mode? m_sandbox is determined by !startupConfig.GetBoolean("gridmode", false) | 373 | // StandAlone mode? m_sandbox is determined by !startupConfig.GetBoolean("gridmode", false) |
373 | if (m_sandbox) | 374 | if (m_sandbox) |
@@ -378,28 +379,28 @@ namespace OpenSim | |||
378 | LocalUserServices userService = | 379 | LocalUserServices userService = |
379 | new LocalUserServices(m_networkServersInfo, m_networkServersInfo.DefaultHomeLocX, | 380 | new LocalUserServices(m_networkServersInfo, m_networkServersInfo.DefaultHomeLocX, |
380 | m_networkServersInfo.DefaultHomeLocY, inventoryService); | 381 | m_networkServersInfo.DefaultHomeLocY, inventoryService); |
381 | userService.AddPlugin(m_standaloneUserPlugin, m_standaloneUserSource); | 382 | userService.AddPlugin(m_standaloneUserPlugin, m_standaloneUserSource); |
382 | 383 | ||
383 | LocalBackEndServices backendService = new LocalBackEndServices(); | 384 | LocalBackEndServices backendService = new LocalBackEndServices(); |
384 | 385 | ||
385 | CommunicationsLocal localComms = | 386 | LocalLoginService loginService = |
386 | new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, userService, userService, | 387 | new LocalLoginService( |
387 | inventoryService, backendService, backendService, m_dumpAssetsToFile); | 388 | userService, m_standaloneWelcomeMessage, inventoryService, backendService, m_networkServersInfo, |
388 | m_commsManager = localComms; | 389 | m_standaloneAuthenticate, libraryRootFolder); |
389 | 390 | ||
390 | m_loginService = | 391 | m_commsManager |
391 | new LocalLoginService(userService, m_standaloneWelcomeMessage, localComms, m_networkServersInfo, | 392 | = new CommunicationsLocal( |
392 | m_standaloneAuthenticate); | 393 | m_networkServersInfo, m_httpServer, m_assetCache, userService, userService, |
393 | m_loginService.OnLoginToRegion += backendService.AddNewSession; | 394 | inventoryService, backendService, backendService, libraryRootFolder, m_dumpAssetsToFile); |
394 | 395 | ||
395 | // set up XMLRPC handler for client's initial login request message | 396 | // set up XMLRPC handler for client's initial login request message |
396 | m_httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); | 397 | m_httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod); |
397 | 398 | ||
398 | // provides the web form login | 399 | // provides the web form login |
399 | m_httpServer.AddHTTPHandler("login", m_loginService.ProcessHTMLLogin); | 400 | m_httpServer.AddHTTPHandler("login", loginService.ProcessHTMLLogin); |
400 | 401 | ||
401 | // Provides the LLSD login | 402 | // Provides the LLSD login |
402 | m_httpServer.SetDefaultLLSDHandler(m_loginService.LLSDLoginMethod); | 403 | m_httpServer.SetDefaultLLSDHandler(loginService.LLSDLoginMethod); |
403 | 404 | ||
404 | // provide grid info | 405 | // provide grid info |
405 | // m_gridInfoService = new GridInfoService(m_config.Source.Configs["Startup"].GetString("inifile", Path.Combine(Util.configDir(), "OpenSim.ini"))); | 406 | // m_gridInfoService = new GridInfoService(m_config.Source.Configs["Startup"].GetString("inifile", Path.Combine(Util.configDir(), "OpenSim.ini"))); |
@@ -410,7 +411,9 @@ namespace OpenSim | |||
410 | else | 411 | else |
411 | { | 412 | { |
412 | // We are in grid mode | 413 | // We are in grid mode |
413 | m_commsManager = new CommunicationsOGS1(m_networkServersInfo, m_httpServer, m_assetCache); | 414 | m_commsManager |
415 | = new CommunicationsOGS1(m_networkServersInfo, m_httpServer, m_assetCache, libraryRootFolder); | ||
416 | |||
414 | m_httpServer.AddStreamHandler(new SimStatusHandler()); | 417 | m_httpServer.AddStreamHandler(new SimStatusHandler()); |
415 | } | 418 | } |
416 | 419 | ||
@@ -421,6 +424,9 @@ namespace OpenSim | |||
421 | m_moduleLoader = new ModuleLoader(m_config.Source); | 424 | m_moduleLoader = new ModuleLoader(m_config.Source); |
422 | 425 | ||
423 | LoadPlugins(); | 426 | LoadPlugins(); |
427 | |||
428 | // Only enable logins to the regions once we have completely finished starting up | ||
429 | m_commsManager.GridService.RegionLoginsEnabled = true; | ||
424 | } | 430 | } |
425 | 431 | ||
426 | protected override void Initialize() | 432 | protected override void Initialize() |