aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Client/Linden/LLStandaloneLoginModule.cs4
-rw-r--r--OpenSim/Client/Linden/LLStandaloneLoginService.cs10
-rw-r--r--OpenSim/Framework/Communications/Services/LoginService.cs4
-rw-r--r--OpenSim/Framework/Communications/Tests/LoginServiceTests.cs4
-rw-r--r--bin/OpenSim.ini.example4
5 files changed, 7 insertions, 19 deletions
diff --git a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs
index 9cfa3c1..6474feb 100644
--- a/OpenSim/Client/Linden/LLStandaloneLoginModule.cs
+++ b/OpenSim/Client/Linden/LLStandaloneLoginModule.cs
@@ -54,7 +54,6 @@ namespace OpenSim.Client.Linden
54 protected bool m_enabled = false; // Module is only enabled if running in standalone mode 54 protected bool m_enabled = false; // Module is only enabled if running in standalone mode
55 55
56 protected bool authenticate; 56 protected bool authenticate;
57 protected bool m_warn_already_logged;
58 protected string welcomeMessage; 57 protected string welcomeMessage;
59 58
60 public bool RegionLoginsEnabled 59 public bool RegionLoginsEnabled
@@ -79,11 +78,9 @@ namespace OpenSim.Client.Linden
79 public void Initialise(IConfigSource source) 78 public void Initialise(IConfigSource source)
80 { 79 {
81 IConfig startupConfig = source.Configs["Startup"]; 80 IConfig startupConfig = source.Configs["Startup"];
82 IConfig stdaloneConfig = source.Configs["StandAlone"];
83 if (startupConfig != null) 81 if (startupConfig != null)
84 { 82 {
85 m_enabled = !startupConfig.GetBoolean("gridmode", false); 83 m_enabled = !startupConfig.GetBoolean("gridmode", false);
86 m_warn_already_logged = stdaloneConfig.GetBoolean("warn_user_already_logged_in", true);
87 } 84 }
88 85
89 if (m_enabled) 86 if (m_enabled)
@@ -115,7 +112,6 @@ namespace OpenSim.Client.Linden
115 112
116 //TODO: fix the casting of the user service, maybe by registering the userManagerBase with scenes, or refactoring so we just need a IUserService reference 113 //TODO: fix the casting of the user service, maybe by registering the userManagerBase with scenes, or refactoring so we just need a IUserService reference
117 m_loginService = new LLStandaloneLoginService((UserManagerBase)m_firstScene.CommsManager.UserAdminService, welcomeMessage, m_firstScene.CommsManager.InterServiceInventoryService, m_firstScene.CommsManager.NetworkServersInfo, authenticate, rootFolder, this); 114 m_loginService = new LLStandaloneLoginService((UserManagerBase)m_firstScene.CommsManager.UserAdminService, welcomeMessage, m_firstScene.CommsManager.InterServiceInventoryService, m_firstScene.CommsManager.NetworkServersInfo, authenticate, rootFolder, this);
118 m_loginService.WarnAlreadyLogged = m_warn_already_logged;
119 115
120 httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); 116 httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod);
121 117
diff --git a/OpenSim/Client/Linden/LLStandaloneLoginService.cs b/OpenSim/Client/Linden/LLStandaloneLoginService.cs
index d9af24d..6b217e6 100644
--- a/OpenSim/Client/Linden/LLStandaloneLoginService.cs
+++ b/OpenSim/Client/Linden/LLStandaloneLoginService.cs
@@ -52,14 +52,6 @@ namespace OpenSim.Client.Linden
52 protected NetworkServersInfo m_serversInfo; 52 protected NetworkServersInfo m_serversInfo;
53 protected bool m_authUsers = false; 53 protected bool m_authUsers = false;
54 54
55 // If true, warns the user that he is already logged, forcing another login.
56 // If false, skips message and logs in directly, kicking out current user.
57 public bool WarnAlreadyLogged
58 {
59 get { return m_warn_already_logged; }
60 set { m_warn_already_logged = value; }
61 }
62
63 /// <summary> 55 /// <summary>
64 /// Used to make requests to the local regions. 56 /// Used to make requests to the local regions.
65 /// </summary> 57 /// </summary>
@@ -79,6 +71,8 @@ namespace OpenSim.Client.Linden
79 71
80 m_inventoryService = interServiceInventoryService; 72 m_inventoryService = interServiceInventoryService;
81 m_regionsConnector = regionsConnector; 73 m_regionsConnector = regionsConnector;
74 // Standard behavior: In StandAlone, silent logout of last hung session
75 m_warn_already_logged = false;
82 } 76 }
83 77
84 public override UserProfileData GetTheUser(string firstname, string lastname) 78 public override UserProfileData GetTheUser(string firstname, string lastname)
diff --git a/OpenSim/Framework/Communications/Services/LoginService.cs b/OpenSim/Framework/Communications/Services/LoginService.cs
index 36ec26e..900a3d9 100644
--- a/OpenSim/Framework/Communications/Services/LoginService.cs
+++ b/OpenSim/Framework/Communications/Services/LoginService.cs
@@ -181,10 +181,9 @@ namespace OpenSim.Framework.Communications.Services
181 // try to tell the region that their user is dead. 181 // try to tell the region that their user is dead.
182 LogOffUser(userProfile, " XMLRPC You were logged off because you logged in from another location"); 182 LogOffUser(userProfile, " XMLRPC You were logged off because you logged in from another location");
183 183
184 // Reject the login
185
186 if (m_warn_already_logged) 184 if (m_warn_already_logged)
187 { 185 {
186 // This is behavior for for grid, reject login
188 m_log.InfoFormat( 187 m_log.InfoFormat(
189 "[LOGIN END]: XMLRPC Notifying user {0} {1} that they are already logged in", 188 "[LOGIN END]: XMLRPC Notifying user {0} {1} that they are already logged in",
190 firstname, lastname); 189 firstname, lastname);
@@ -193,6 +192,7 @@ namespace OpenSim.Framework.Communications.Services
193 } 192 }
194 else 193 else
195 { 194 {
195 // This is behavior for standalone (silent logout of last hung session)
196 m_log.InfoFormat( 196 m_log.InfoFormat(
197 "[LOGIN]: User {0} {1} is already logged in, not notifying user, kicking old presence and starting new login.", 197 "[LOGIN]: User {0} {1} is already logged in, not notifying user, kicking old presence and starting new login.",
198 firstname, lastname); 198 firstname, lastname);
diff --git a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs
index 0cce2f0..7a622ad 100644
--- a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs
+++ b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs
@@ -304,7 +304,9 @@ namespace OpenSim.Framework.Communications.Tests
304 304
305 } 305 }
306 306
307 [Test] 307 // [Test]
308 // Commenting out test now that LLStandAloneLoginService no longer replies with message in this case.
309 // Kept the code for future test with grid mode, which will keep this behavior.
308 public void T023_TestAuthenticatedLoginAlreadyLoggedIn() 310 public void T023_TestAuthenticatedLoginAlreadyLoggedIn()
309 { 311 {
310 TestHelper.InMethod(); 312 TestHelper.InMethod();
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index b47d207..cae87ee 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -256,10 +256,6 @@
256 accounts_authenticate = true 256 accounts_authenticate = true
257 welcome_message = "Welcome to OpenSimulator" 257 welcome_message = "Welcome to OpenSimulator"
258 258
259 ; Shows or skips the "please wait 5 minutes" message when you crash or are already logged in.
260 ; If false, it will silently kick the user from the scene and login.
261 warn_user_already_logged_in = true
262
263 ; Inventory database provider 259 ; Inventory database provider
264 inventory_plugin = "OpenSim.Data.SQLite.dll" 260 inventory_plugin = "OpenSim.Data.SQLite.dll"
265 ; inventory_plugin = "OpenSim.Data.MySQL.dll" 261 ; inventory_plugin = "OpenSim.Data.MySQL.dll"