From ba132f3a0bbbc2f749bec9c563e169d22c76f74b Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 10 Apr 2008 15:28:52 +0000 Subject: [PATCH] * Minor: get CreateNewUserInventory() to return true on success --- OpenSim/Framework/Communications/IInventoryServices.cs | 5 +++-- OpenSim/Framework/Communications/InventoryServiceBase.cs | 6 +++++- OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs | 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/OpenSim/Framework/Communications/IInventoryServices.cs b/OpenSim/Framework/Communications/IInventoryServices.cs index eaa2350574..966ab75558 100644 --- a/OpenSim/Framework/Communications/IInventoryServices.cs +++ b/OpenSim/Framework/Communications/IInventoryServices.cs @@ -66,10 +66,11 @@ namespace OpenSim.Framework.Communications void DeleteInventoryItem(LLUUID userID, InventoryItemBase item); /// - /// Create a new inventory for the given user + /// Create a new inventory for the given user. /// /// - void CreateNewUserInventory(LLUUID user); + /// true if the inventory was successfully created, false otherwise + bool CreateNewUserInventory(LLUUID user); bool HasInventoryForUser(LLUUID userID); diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs index 0d1993261d..f9a47b190e 100644 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs @@ -135,7 +135,7 @@ namespace OpenSim.Framework.Communications } // See IInventoryServices - public void CreateNewUserInventory(LLUUID user) + public bool CreateNewUserInventory(LLUUID user) { InventoryFolderBase existingRootFolder = RequestRootFolder(user); @@ -151,7 +151,11 @@ namespace OpenSim.Framework.Communications UsersInventory inven = new UsersInventory(); inven.CreateNewInventorySet(user); AddNewInventorySet(inven); + + return true; } + + return false; } public abstract void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index 3a13f71814..b18c5bf071 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs @@ -208,8 +208,9 @@ namespace OpenSim.Region.Communications.OGS1 return null; } - public void CreateNewUserInventory(LLUUID user) + public bool CreateNewUserInventory(LLUUID user) { + return false; } // See IInventoryServices