diff options
Diffstat (limited to '')
5 files changed, 47 insertions, 1 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index b98cec7..d010bd5 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs | |||
@@ -379,7 +379,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
379 | baseFolder.Type = (short) type; | 379 | baseFolder.Type = (short) type; |
380 | baseFolder.Version = RootFolder.Version; | 380 | baseFolder.Version = RootFolder.Version; |
381 | 381 | ||
382 | m_commsManager.InventoryService.AddFolder(baseFolder); | 382 | m_commsManager.InventoryService.UpdateFolder(baseFolder); |
383 | } | 383 | } |
384 | else | 384 | else |
385 | { | 385 | { |
diff --git a/OpenSim/Framework/Communications/IInventoryServices.cs b/OpenSim/Framework/Communications/IInventoryServices.cs index f7a8857..8dc09bc 100644 --- a/OpenSim/Framework/Communications/IInventoryServices.cs +++ b/OpenSim/Framework/Communications/IInventoryServices.cs | |||
@@ -58,6 +58,13 @@ namespace OpenSim.Framework.Communications | |||
58 | bool AddFolder(InventoryFolderBase folder); | 58 | bool AddFolder(InventoryFolderBase folder); |
59 | 59 | ||
60 | /// <summary> | 60 | /// <summary> |
61 | /// Update a folder in the user's inventory | ||
62 | /// </summary> | ||
63 | /// <param name="folder"></param> | ||
64 | /// <returns>true if the folder was successfully updated</returns> | ||
65 | bool UpdateFolder(InventoryFolderBase folder); | ||
66 | |||
67 | /// <summary> | ||
61 | /// Move an inventory folder to a new location | 68 | /// Move an inventory folder to a new location |
62 | /// </summary> | 69 | /// </summary> |
63 | /// <param name="folder">A folder containing the details of the new location</param> | 70 | /// <param name="folder">A folder containing the details of the new location</param> |
diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs index dffeed3..89ccf93 100644 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs | |||
@@ -199,6 +199,21 @@ namespace OpenSim.Framework.Communications | |||
199 | } | 199 | } |
200 | 200 | ||
201 | // See IInventoryServices | 201 | // See IInventoryServices |
202 | public bool UpdateFolder(InventoryFolderBase folder) | ||
203 | { | ||
204 | m_log.DebugFormat( | ||
205 | "[AGENT INVENTORY]: Updating folder {0} {1} to folder {2}", folder.Name, folder.ID, folder.ParentID); | ||
206 | |||
207 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) | ||
208 | { | ||
209 | plugin.Value.updateInventoryFolder(folder); | ||
210 | } | ||
211 | |||
212 | // FIXME: Should return false on failure | ||
213 | return true; | ||
214 | } | ||
215 | |||
216 | // See IInventoryServices | ||
202 | public bool MoveFolder(InventoryFolderBase folder) | 217 | public bool MoveFolder(InventoryFolderBase folder) |
203 | { | 218 | { |
204 | m_log.DebugFormat( | 219 | m_log.DebugFormat( |
diff --git a/OpenSim/Grid/InventoryServer/Main.cs b/OpenSim/Grid/InventoryServer/Main.cs index 4300554..a068892 100644 --- a/OpenSim/Grid/InventoryServer/Main.cs +++ b/OpenSim/Grid/InventoryServer/Main.cs | |||
@@ -98,6 +98,10 @@ namespace OpenSim.Grid.InventoryServer | |||
98 | 98 | ||
99 | m_httpServer.AddStreamHandler( | 99 | m_httpServer.AddStreamHandler( |
100 | new RestDeserialisehandler<InventoryFolderBase, bool>( | 100 | new RestDeserialisehandler<InventoryFolderBase, bool>( |
101 | "POST", "/UpdateFolder/", m_inventoryService.UpdateFolder)); | ||
102 | |||
103 | m_httpServer.AddStreamHandler( | ||
104 | new RestDeserialisehandler<InventoryFolderBase, bool>( | ||
101 | "POST", "/MoveFolder/", m_inventoryService.MoveFolder)); | 105 | "POST", "/MoveFolder/", m_inventoryService.MoveFolder)); |
102 | 106 | ||
103 | m_httpServer.AddStreamHandler( | 107 | m_httpServer.AddStreamHandler( |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index 9b3d878..dfc741a 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs | |||
@@ -179,6 +179,26 @@ namespace OpenSim.Region.Communications.OGS1 | |||
179 | /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> | 179 | /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> |
180 | /// </summary> | 180 | /// </summary> |
181 | /// <param name="folder"></param> | 181 | /// <param name="folder"></param> |
182 | public bool UpdateFolder(InventoryFolderBase folder) | ||
183 | { | ||
184 | try | ||
185 | { | ||
186 | return SynchronousRestObjectPoster.BeginPostObject<InventoryFolderBase, bool>( | ||
187 | "POST", _inventoryServerUrl + "/UpdateFolder/", folder); | ||
188 | } | ||
189 | catch (WebException e) | ||
190 | { | ||
191 | m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Update inventory folder operation failed, {0} {1}", | ||
192 | e.Source, e.Message); | ||
193 | } | ||
194 | |||
195 | return false; | ||
196 | } | ||
197 | |||
198 | /// <summary> | ||
199 | /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> | ||
200 | /// </summary> | ||
201 | /// <param name="folder"></param> | ||
182 | public bool MoveFolder(InventoryFolderBase folder) | 202 | public bool MoveFolder(InventoryFolderBase folder) |
183 | { | 203 | { |
184 | try | 204 | try |