aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid')
-rw-r--r--OpenSim/Grid/UserServer/UserLoginService.cs34
1 files changed, 27 insertions, 7 deletions
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs
index f404cce..fa5eac5 100644
--- a/OpenSim/Grid/UserServer/UserLoginService.cs
+++ b/OpenSim/Grid/UserServer/UserLoginService.cs
@@ -197,15 +197,32 @@ namespace OpenSim.Grid.UserServer
197 197
198 protected override InventoryData CreateInventoryData(LLUUID userID) 198 protected override InventoryData CreateInventoryData(LLUUID userID)
199 { 199 {
200 List<InventoryFolderBase> folders = SynchronousRestObjectPoster.BeginPostObject<LLUUID, List<InventoryFolderBase>>("POST", m_config.InventoryUrl + "RootFolders/", userID); 200 List<InventoryFolderBase> folders
201 if (folders ==null | folders.Count == 0) 201 = SynchronousRestObjectPoster.BeginPostObject<LLUUID, List<InventoryFolderBase>>(
202 "POST", m_config.InventoryUrl + "RootFolders/", userID);
203
204 // In theory, the user will only ever be missing a root folder in situations where a grid
205 // which didn't previously run a grid wide inventory server is being transitioned to one
206 // which does.
207 if (null == folders | folders.Count == 0)
202 { 208 {
203 RestObjectPoster.BeginPostObject<LLUUID>(m_config.InventoryUrl + "CreateInventory/", userID); 209 MainLog.Instance.Warn(
204 Thread.Sleep(1000); 210 "LOGIN",
205 folders = SynchronousRestObjectPoster.BeginPostObject<LLUUID, List<InventoryFolderBase>>("POST", m_config.InventoryUrl + "RootFolders/", userID); 211 "A root inventory folder for user ID " + userID + " was not found. A new set"
212 + " of empty inventory folders is being created.");
213
214 RestObjectPoster.BeginPostObject<LLUUID>(
215 m_config.InventoryUrl + "CreateInventory/", userID);
216
217 // A big delay should be okay here since the recreation of the user's root folders should
218 // only ever happen once. We need to sleep to let the inventory server do its work -
219 // previously 1000ms has been found to be too short.
220 Thread.Sleep(10000);
221 folders = SynchronousRestObjectPoster.BeginPostObject<LLUUID, List<InventoryFolderBase>>(
222 "POST", m_config.InventoryUrl + "RootFolders/", userID);
206 } 223 }
207 224
208 if(folders.Count >0) 225 if (folders.Count > 0)
209 { 226 {
210 LLUUID rootID = LLUUID.Zero; 227 LLUUID rootID = LLUUID.Zero;
211 ArrayList AgentInventoryArray = new ArrayList(); 228 ArrayList AgentInventoryArray = new ArrayList();
@@ -228,6 +245,9 @@ namespace OpenSim.Grid.UserServer
228 } 245 }
229 else 246 else
230 { 247 {
248 MainLog.Instance.Warn("LOGIN", "The root inventory folder could still not be retrieved" +
249 " for user ID " + userID);
250
231 AgentInventory userInventory = new AgentInventory(); 251 AgentInventory userInventory = new AgentInventory();
232 userInventory.CreateRootFolder(userID, false); 252 userInventory.CreateRootFolder(userID, false);
233 253
@@ -248,4 +268,4 @@ namespace OpenSim.Grid.UserServer
248 } 268 }
249 } 269 }
250 } 270 }
251} \ No newline at end of file 271}