mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
This patch fixes mantis 105. Basically, it stops the index exception when
no root folder is found and it makes the user server wait longer for the inventory server to do its work. From Justin Casey (IBM)
This commit is contained in:
@@ -201,11 +201,7 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the users inventory root folder.
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <returns></returns>
|
||||
// see InventoryItemBase.getUserRootFolder
|
||||
public InventoryFolderBase getUserRootFolder(LLUUID user)
|
||||
{
|
||||
try
|
||||
@@ -224,8 +220,14 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||
items.Add(readInventoryFolder(reader));
|
||||
|
||||
InventoryFolderBase rootFolder = null;
|
||||
|
||||
// There should only ever be one root folder for a user. However, if there's more
|
||||
// than one we'll simply use the first one rather than failing. It would be even
|
||||
// nicer to print some message to this effect, but this feels like it's too low a
|
||||
// to put such a message out, and it's too minor right now to spare the time to
|
||||
// suitably refactor.
|
||||
if (items.Count > 0) {
|
||||
rootFolder = items[0]; //should only be one folder with parent set to zero (the root one).
|
||||
rootFolder = items[0];
|
||||
}
|
||||
|
||||
reader.Close();
|
||||
@@ -694,4 +696,4 @@ namespace OpenSim.Framework.Data.MSSQL
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user