aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/LLLoginService/LLLoginService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/LLLoginService/LLLoginService.cs')
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs24
1 files changed, 20 insertions, 4 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 58038cb..2b74539 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -26,13 +26,14 @@ namespace OpenSim.Services.LLLoginService
26 private IGridService m_GridService; 26 private IGridService m_GridService;
27 private IPresenceService m_PresenceService; 27 private IPresenceService m_PresenceService;
28 private ISimulationService m_LocalSimulationService; 28 private ISimulationService m_LocalSimulationService;
29 private ILibraryService m_LibraryService;
29 30
30 private string m_DefaultRegionName; 31 private string m_DefaultRegionName;
31 private string m_RemoteSimulationDll; 32 private string m_RemoteSimulationDll;
32 private string m_WelcomeMessage; 33 private string m_WelcomeMessage;
33 private bool m_RequireInventory; 34 private bool m_RequireInventory;
34 35
35 public LLLoginService(IConfigSource config, ISimulationService simService) 36 public LLLoginService(IConfigSource config, ISimulationService simService, ILibraryService libraryService)
36 { 37 {
37 IConfig serverConfig = config.Configs["LoginService"]; 38 IConfig serverConfig = config.Configs["LoginService"];
38 if (serverConfig == null) 39 if (serverConfig == null)
@@ -43,13 +44,14 @@ namespace OpenSim.Services.LLLoginService
43 string invService = serverConfig.GetString("InventoryService", String.Empty); 44 string invService = serverConfig.GetString("InventoryService", String.Empty);
44 string gridService = serverConfig.GetString("GridService", String.Empty); 45 string gridService = serverConfig.GetString("GridService", String.Empty);
45 string presenceService = serverConfig.GetString("PresenceService", String.Empty); 46 string presenceService = serverConfig.GetString("PresenceService", String.Empty);
47 string libService = serverConfig.GetString("LibraryService", String.Empty);
46 48
47 m_DefaultRegionName = serverConfig.GetString("DefaultRegion", String.Empty); 49 m_DefaultRegionName = serverConfig.GetString("DefaultRegion", String.Empty);
48 m_RemoteSimulationDll = serverConfig.GetString("RemoteSimulationService", String.Empty); 50 m_RemoteSimulationDll = serverConfig.GetString("RemoteSimulationService", String.Empty);
49 m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!"); 51 m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!");
50 m_RequireInventory = serverConfig.GetBoolean("RequireInventory", true); 52 m_RequireInventory = serverConfig.GetBoolean("RequireInventory", true);
51 53
52 // These 3 are required; the other 2 aren't 54 // These 3 are required; the others aren't
53 if (accountService == string.Empty || authService == string.Empty || 55 if (accountService == string.Empty || authService == string.Empty ||
54 invService == string.Empty) 56 invService == string.Empty)
55 throw new Exception("LoginService is missing service specifications"); 57 throw new Exception("LoginService is missing service specifications");
@@ -62,13 +64,27 @@ namespace OpenSim.Services.LLLoginService
62 m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args); 64 m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
63 if (presenceService != string.Empty) 65 if (presenceService != string.Empty)
64 m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args); 66 m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args);
67
68 //
69 // deal with the services given as argument
70 //
65 m_LocalSimulationService = simService; 71 m_LocalSimulationService = simService;
72 if (libraryService != null)
73 {
74 m_log.DebugFormat("[LLOGIN SERVICE]: Using LibraryService given as argument");
75 m_LibraryService = libraryService;
76 }
77 else if (libService != string.Empty)
78 {
79 m_log.DebugFormat("[LLOGIN SERVICE]: Using instantiated LibraryService");
80 m_LibraryService = ServerUtils.LoadPlugin<ILibraryService>(libService, args);
81 }
66 82
67 m_log.DebugFormat("[LLOGIN SERVICE]: Starting..."); 83 m_log.DebugFormat("[LLOGIN SERVICE]: Starting...");
68 84
69 } 85 }
70 86
71 public LLLoginService(IConfigSource config) : this(config, null) 87 public LLLoginService(IConfigSource config) : this(config, null, null)
72 { 88 {
73 } 89 }
74 90
@@ -171,7 +187,7 @@ namespace OpenSim.Services.LLLoginService
171 // TODO: Get Friends list... 187 // TODO: Get Friends list...
172 188
173 // Finally, fill out the response and return it 189 // Finally, fill out the response and return it
174 LLLoginResponse response = new LLLoginResponse(account, aCircuit, presence, destination, inventorySkel, 190 LLLoginResponse response = new LLLoginResponse(account, aCircuit, presence, destination, inventorySkel, m_LibraryService,
175 where, startLocation, position, lookAt, m_WelcomeMessage, home, clientIP); 191 where, startLocation, position, lookAt, m_WelcomeMessage, home, clientIP);
176 192
177 return response; 193 return response;