From da531fa9e124394228a7c7597bd50e548af81efb Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Sun, 23 Mar 2008 21:21:39 +0000
Subject: * Start passing around a region server's http port in RegionInfo. *
This means that caps methods (editing scripts, poss map functions, etc) on
non-home regions should now work with servers which are listening for http
ports on a non default (9000) port. * If you are running a region server,
this may only work properly once your grid server upgrades to this revision *
PLEASE NOTE: This shouldn't cause inter-region problems if one end of the
connection hasn't upgraded to this revision. However if it does, the
instability will persist until the grid and region (and possibly all the
region's neighbours) have upgraded to this revision. * This revision also
adds extra login related messages, both for success and failure conditions
---
OpenSim/Framework/Communications/LoginService.cs | 57 ++++++++++++++++--------
1 file changed, 39 insertions(+), 18 deletions(-)
(limited to 'OpenSim/Framework/Communications')
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs
index be47258..3e3216f 100644
--- a/OpenSim/Framework/Communications/LoginService.cs
+++ b/OpenSim/Framework/Communications/LoginService.cs
@@ -73,7 +73,7 @@ namespace OpenSim.Framework.UserManagement
}
///
- /// Main user login function
+ /// Called when we receive the client's initial
///
/// The XMLRPC request
/// The response to send
@@ -94,25 +94,32 @@ namespace OpenSim.Framework.UserManagement
string startLocationRequest = "last";
- if (requestData.Contains("start"))
- {
- startLocationRequest = (string)requestData["start"];
- m_log.Info("[LOGIN]: Client Requested Start: " + (string)requestData["start"]);
- }
-
UserProfileData userProfile;
LoginResponse logResponse = new LoginResponse();
+
+ string firstname = String.Empty;
+ string lastname = String.Empty;
if (GoodXML)
{
- string firstname = (string) requestData["first"];
- string lastname = (string) requestData["last"];
+ firstname = (string) requestData["first"];
+ lastname = (string) requestData["last"];
+
+ m_log.InfoFormat(
+ "[LOGIN]: Received login request message from user {0} {1}",
+ firstname, lastname);
if( requestData.Contains("version"))
{
string clientversion = (string)requestData["version"];
- m_log.Info("[LOGIN]: Client Version " + clientversion + " for " + firstname + " " + lastname);
+ m_log.Info("[LOGIN]: Client version: " + clientversion);
}
+
+ if (requestData.Contains("start"))
+ {
+ startLocationRequest = (string)requestData["start"];
+ m_log.Info("[LOGIN]: Client requested start location: " + (string)requestData["start"]);
+ }
userProfile = GetTheUser(firstname, lastname);
if (userProfile == null)
@@ -134,31 +141,35 @@ namespace OpenSim.Framework.UserManagement
{
webloginkey = new LLUUID((string)requestData["web_login_key"]);
}
- catch (System.Exception)
+ catch (System.Exception e)
{
+ m_log.InfoFormat(
+ "[LOGIN]: Bad web_login_key: {0} for user {1} {2}, exception {3}",
+ requestData["web_login_key"], firstname, lastname, e);
+
return logResponse.CreateFailedResponse();
}
GoodLogin = AuthenticateUser(userProfile, webloginkey);
}
- else
- {
- return logResponse.CreateFailedResponse();
- }
}
else
{
+ m_log.Info(
+ "[LOGIN]: login_to_simulator login message did not contain all the required data");
+
return logResponse.CreateGridErrorResponse();
}
if (!GoodLogin)
{
+ m_log.InfoFormat("[LOGIN]: User {0} {1} failed authentication", firstname, lastname);
+
return logResponse.CreateLoginFailedResponse();
}
else
{
// If we already have a session...
-
if (userProfile.currentAgent != null && userProfile.currentAgent.agentOnline)
{
//TODO: The following statements can cause trouble:
@@ -169,6 +180,11 @@ namespace OpenSim.Framework.UserManagement
m_userManager.CommitAgent(ref userProfile);
// Reject the login
+
+ m_log.InfoFormat(
+ "[LOGIN]: Notifying user {0} {1} that they are already logged in",
+ firstname, lastname);
+
return logResponse.CreateAlreadyLoggedInResponse();
}
// Otherwise...
@@ -234,14 +250,19 @@ namespace OpenSim.Framework.UserManagement
if (StatsManager.UserStats != null)
StatsManager.UserStats.AddSuccessfulLogin();
+ m_log.InfoFormat(
+ "[LOGIN]: Authentication of user {0} {1} successful. Sending response to client.",
+ firstname, lastname);
+
return logResponse.ToXmlRpcResponse();
}
catch (Exception e)
{
- m_log.Info("[LOGIN]: " + e.ToString());
+ m_log.Info("[LOGIN]: Login failed, exception" + e.ToString());
}
- //}
}
+
+ m_log.Info("[LOGIN]: Login failed. Sending back blank XMLRPC response");
return response;
}
finally
--
cgit v1.1