diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Communications/LoginResponse.cs | 13 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/LoginService.cs | 41 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserLoginService.cs | 2 |
3 files changed, 43 insertions, 13 deletions
diff --git a/OpenSim/Framework/Communications/LoginResponse.cs b/OpenSim/Framework/Communications/LoginResponse.cs index 763274a..53ec796 100644 --- a/OpenSim/Framework/Communications/LoginResponse.cs +++ b/OpenSim/Framework/Communications/LoginResponse.cs | |||
@@ -238,6 +238,19 @@ namespace OpenSim.Framework.UserManagement | |||
238 | "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist.", | 238 | "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist.", |
239 | "false"); | 239 | "false"); |
240 | } | 240 | } |
241 | |||
242 | /// <summary> | ||
243 | /// Response to indicate that login failed because the agent's inventory was not available. | ||
244 | /// </summary> | ||
245 | /// <returns></returns> | ||
246 | public XmlRpcResponse CreateLoginInventoryFailedResponse() | ||
247 | { | ||
248 | return GenerateFailureResponse( | ||
249 | "key", | ||
250 | "The agent inventory service is not responding. Please notify the grid operator if this is a grid sim," | ||
251 | + " or the sim operator if this is a standalone sim.", | ||
252 | "false"); | ||
253 | } | ||
241 | 254 | ||
242 | public XmlRpcResponse CreateAlreadyLoggedInResponse() | 255 | public XmlRpcResponse CreateAlreadyLoggedInResponse() |
243 | { | 256 | { |
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 |
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index 78055c8..c07777e 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs | |||
@@ -302,6 +302,8 @@ namespace OpenSim.Grid.UserServer | |||
302 | // See LoginService | 302 | // See LoginService |
303 | protected override InventoryData GetInventorySkeleton(LLUUID userID) | 303 | protected override InventoryData GetInventorySkeleton(LLUUID userID) |
304 | { | 304 | { |
305 | m_log.InfoFormat("[LOGIN]: Contacting inventory service at {0} for inventory skeleton of agent {1}", m_config.InventoryUrl, userID); | ||
306 | |||
305 | List<InventoryFolderBase> folders | 307 | List<InventoryFolderBase> folders |
306 | = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>( | 308 | = SynchronousRestObjectPoster.BeginPostObject<Guid, List<InventoryFolderBase>>( |
307 | "POST", m_config.InventoryUrl + "RootFolders/", userID.UUID); | 309 | "POST", m_config.InventoryUrl + "RootFolders/", userID.UUID); |