aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/LoginService.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-04-15 18:10:42 +0000
committerJustin Clarke Casey2008-04-15 18:10:42 +0000
commit39165f3de4e4a207e4461a8d94acaff611dd9873 (patch)
tree0262019f4ef5e83ed9e8bfdff29a0dcf5dd8384d /OpenSim/Framework/Communications/LoginService.cs
parentFixed LSL State support. (diff)
downloadopensim-SC_OLD-39165f3de4e4a207e4461a8d94acaff611dd9873.zip
opensim-SC_OLD-39165f3de4e4a207e4461a8d94acaff611dd9873.tar.gz
opensim-SC_OLD-39165f3de4e4a207e4461a8d94acaff611dd9873.tar.bz2
opensim-SC_OLD-39165f3de4e4a207e4461a8d94acaff611dd9873.tar.xz
* Send a meaningful response to both the user server console and the client if a login fails because the inventory service has failed.
Diffstat (limited to 'OpenSim/Framework/Communications/LoginService.cs')
-rw-r--r--OpenSim/Framework/Communications/LoginService.cs41
1 files changed, 28 insertions, 13 deletions
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs
index afe7359..f8ac75e 100644
--- a/OpenSim/Framework/Communications/LoginService.cs
+++ b/OpenSim/Framework/Communications/LoginService.cs
@@ -84,6 +84,7 @@ namespace OpenSim.Framework.UserManagement
84 /// </summary> 84 /// </summary>
85 /// <param name="userID"></param> 85 /// <param name="userID"></param>
86 /// <returns></returns> 86 /// <returns></returns>
87 /// <exception cref='System.Net.WebException'>This will be thrown if there is a problem with the inventory service</exception>
87 protected abstract InventoryData GetInventorySkeleton(LLUUID userID); 88 protected abstract InventoryData GetInventorySkeleton(LLUUID userID);
88 89
89 /// <summary> 90 /// <summary>
@@ -208,9 +209,20 @@ namespace OpenSim.Framework.UserManagement
208 try 209 try
209 { 210 {
210 LLUUID agentID = userProfile.ID; 211 LLUUID agentID = userProfile.ID;
211 212 InventoryData inventData = null;
212 // Inventory Library Section 213
213 InventoryData inventData = GetInventorySkeleton(agentID); 214 try
215 {
216 inventData = GetInventorySkeleton(agentID);
217 }
218 catch (System.Net.WebException e)
219 {
220 m_log.ErrorFormat(
221 "[LOGIN]: Error retrieving inventory skeleton of agent {0}, {1} - {2}", agentID, e.GetType(), e.Message);
222
223 return logResponse.CreateLoginInventoryFailedResponse();
224 }
225
214 ArrayList AgentInventoryArray = inventData.InventoryArray; 226 ArrayList AgentInventoryArray = inventData.InventoryArray;
215 227
216 Hashtable InventoryRootHash = new Hashtable(); 228 Hashtable InventoryRootHash = new Hashtable();
@@ -218,7 +230,20 @@ namespace OpenSim.Framework.UserManagement
218 ArrayList InventoryRoot = new ArrayList(); 230 ArrayList InventoryRoot = new ArrayList();
219 InventoryRoot.Add(InventoryRootHash); 231 InventoryRoot.Add(InventoryRootHash);
220 userProfile.RootInventoryFolderID = inventData.RootFolderID; 232 userProfile.RootInventoryFolderID = inventData.RootFolderID;
233
234 // Inventory Library Section
235 Hashtable InventoryLibRootHash = new Hashtable();
236 InventoryLibRootHash["folder_id"] = "00000112-000f-0000-0000-000100bba000";
237 ArrayList InventoryLibRoot = new ArrayList();
238 InventoryLibRoot.Add(InventoryLibRootHash);
239 logResponse.InventoryLibRoot = InventoryLibRoot;
221 240
241 logResponse.InventoryLibraryOwner = GetLibraryOwner();
242
243 logResponse.InventoryRoot = InventoryRoot;
244 logResponse.InventorySkeleton = AgentInventoryArray;
245 logResponse.InventoryLibrary = GetInventoryLibrary();
246
222 // Circuit Code 247 // Circuit Code
223 uint circode = (uint) (Util.RandomClass.Next()); 248 uint circode = (uint) (Util.RandomClass.Next());
224 249
@@ -227,17 +252,7 @@ namespace OpenSim.Framework.UserManagement
227 logResponse.AgentID = agentID.ToString(); 252 logResponse.AgentID = agentID.ToString();
228 logResponse.SessionID = userProfile.CurrentAgent.SessionID.ToString(); 253 logResponse.SessionID = userProfile.CurrentAgent.SessionID.ToString();
229 logResponse.SecureSessionID = userProfile.CurrentAgent.SecureSessionID.ToString(); 254 logResponse.SecureSessionID = userProfile.CurrentAgent.SecureSessionID.ToString();
230 logResponse.InventoryRoot = InventoryRoot;
231 logResponse.InventorySkeleton = AgentInventoryArray;
232 logResponse.InventoryLibrary = GetInventoryLibrary();
233 255
234 Hashtable InventoryLibRootHash = new Hashtable();
235 InventoryLibRootHash["folder_id"] = "00000112-000f-0000-0000-000100bba000";
236 ArrayList InventoryLibRoot = new ArrayList();
237 InventoryLibRoot.Add(InventoryLibRootHash);
238 logResponse.InventoryLibRoot = InventoryLibRoot;
239
240 logResponse.InventoryLibraryOwner = GetLibraryOwner();
241 logResponse.CircuitCode = (Int32) circode; 256 logResponse.CircuitCode = (Int32) circode;
242 //logResponse.RegionX = 0; //overwritten 257 //logResponse.RegionX = 0; //overwritten
243 //logResponse.RegionY = 0; //overwritten 258 //logResponse.RegionY = 0; //overwritten