Prevent the creation of duplicate inventory folders in the case of a login

database issue. Now the login will instaead fail later.
mysql-performance
Melanie 2010-01-01 22:51:00 +00:00
parent 61f63fdc38
commit 0d9591bf35
2 changed files with 13 additions and 2 deletions

View File

@ -264,7 +264,7 @@ namespace OpenSim.Data.MySQL
{ {
database.Reconnect(); database.Reconnect();
m_log.Error(e.ToString()); m_log.Error(e.ToString());
return null; throw;
} }
} }

View File

@ -25,6 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using log4net; using log4net;
@ -102,7 +103,17 @@ namespace OpenSim.Services.InventoryService
// See IInventoryServices // See IInventoryServices
public bool CreateUserInventory(UUID user) public bool CreateUserInventory(UUID user)
{ {
InventoryFolderBase existingRootFolder = GetRootFolder(user); InventoryFolderBase existingRootFolder;
try
{
existingRootFolder = GetRootFolder(user);
}
catch (Exception e)
{
// Munch the exception, it has already been reported
//
return false;
}
if (null != existingRootFolder) if (null != existingRootFolder)
{ {