aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/LoginService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/LoginService.cs')
-rw-r--r--OpenSim/Framework/Communications/LoginService.cs25
1 files changed, 12 insertions, 13 deletions
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs
index 6d4cb68..a284910 100644
--- a/OpenSim/Framework/Communications/LoginService.cs
+++ b/OpenSim/Framework/Communications/LoginService.cs
@@ -64,7 +64,7 @@ namespace OpenSim.Framework.UserManagement
64 //CFK: CustomizeResponse contains sufficient strings to alleviate the need for this. 64 //CFK: CustomizeResponse contains sufficient strings to alleviate the need for this.
65 //CKF: MainLog.Instance.Verbose("LOGIN", "Attempting login now..."); 65 //CKF: MainLog.Instance.Verbose("LOGIN", "Attempting login now...");
66 XmlRpcResponse response = new XmlRpcResponse(); 66 XmlRpcResponse response = new XmlRpcResponse();
67 Hashtable requestData = (Hashtable)request.Params[0]; 67 Hashtable requestData = (Hashtable) request.Params[0];
68 68
69 bool GoodXML = (requestData.Contains("first") && requestData.Contains("last") && 69 bool GoodXML = (requestData.Contains("first") && requestData.Contains("last") &&
70 requestData.Contains("passwd")); 70 requestData.Contains("passwd"));
@@ -75,17 +75,17 @@ namespace OpenSim.Framework.UserManagement
75 75
76 if (GoodXML) 76 if (GoodXML)
77 { 77 {
78 string firstname = (string)requestData["first"]; 78 string firstname = (string) requestData["first"];
79 string lastname = (string)requestData["last"]; 79 string lastname = (string) requestData["last"];
80 string passwd = (string)requestData["passwd"]; 80 string passwd = (string) requestData["passwd"];
81 81
82 userProfile = GetTheUser(firstname, lastname); 82 userProfile = GetTheUser(firstname, lastname);
83 if (userProfile == null) 83 if (userProfile == null)
84 { 84 {
85 MainLog.Instance.Verbose( 85 MainLog.Instance.Verbose(
86 "LOGIN", 86 "LOGIN",
87 "Could not find a profile for " + firstname + " " + lastname); 87 "Could not find a profile for " + firstname + " " + lastname);
88 88
89 return logResponse.CreateLoginFailedResponse(); 89 return logResponse.CreateLoginFailedResponse();
90 } 90 }
91 91
@@ -103,15 +103,14 @@ namespace OpenSim.Framework.UserManagement
103 else 103 else
104 { 104 {
105 // If we already have a session... 105 // If we already have a session...
106 106
107 if (userProfile.currentAgent != null && userProfile.currentAgent.agentOnline) 107 if (userProfile.currentAgent != null && userProfile.currentAgent.agentOnline)
108 { 108 {
109 userProfile.currentAgent = null; 109 userProfile.currentAgent = null;
110 m_userManager.CommitAgent(ref userProfile); 110 m_userManager.CommitAgent(ref userProfile);
111 111
112 // Reject the login 112 // Reject the login
113 return logResponse.CreateAlreadyLoggedInResponse(); 113 return logResponse.CreateAlreadyLoggedInResponse();
114
115 } 114 }
116 // Otherwise... 115 // Otherwise...
117 // Create a new agent session 116 // Create a new agent session
@@ -132,7 +131,7 @@ namespace OpenSim.Framework.UserManagement
132 userProfile.rootInventoryFolderID = inventData.RootFolderID; 131 userProfile.rootInventoryFolderID = inventData.RootFolderID;
133 132
134 // Circuit Code 133 // Circuit Code
135 uint circode = (uint)(Util.RandomClass.Next()); 134 uint circode = (uint) (Util.RandomClass.Next());
136 135
137 logResponse.Lastname = userProfile.surname; 136 logResponse.Lastname = userProfile.surname;
138 logResponse.Firstname = userProfile.username; 137 logResponse.Firstname = userProfile.username;
@@ -150,7 +149,7 @@ namespace OpenSim.Framework.UserManagement
150 logResponse.InventoryLibRoot = InventoryLibRoot; 149 logResponse.InventoryLibRoot = InventoryLibRoot;
151 150
152 logResponse.InventoryLibraryOwner = GetLibraryOwner(); 151 logResponse.InventoryLibraryOwner = GetLibraryOwner();
153 logResponse.CircuitCode = (Int32)circode; 152 logResponse.CircuitCode = (Int32) circode;
154 //logResponse.RegionX = 0; //overwritten 153 //logResponse.RegionX = 0; //overwritten
155 //logResponse.RegionY = 0; //overwritten 154 //logResponse.RegionY = 0; //overwritten
156 logResponse.Home = "!!null temporary value {home}!!"; // Overwritten 155 logResponse.Home = "!!null temporary value {home}!!"; // Overwritten
@@ -277,7 +276,7 @@ namespace OpenSim.Framework.UserManagement
277 TempHash["type_default"] = -1; 276 TempHash["type_default"] = -1;
278 TempHash["folder_id"] = "00000112-000f-0000-0000-000100bba001"; 277 TempHash["folder_id"] = "00000112-000f-0000-0000-000100bba001";
279 temp.Add(TempHash); 278 temp.Add(TempHash);
280 279
281 return temp; 280 return temp;
282 } 281 }
283 282
@@ -328,4 +327,4 @@ namespace OpenSim.Framework.UserManagement
328 } 327 }
329 } 328 }
330 } 329 }
331} 330} \ No newline at end of file