aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/Local
diff options
context:
space:
mode:
authorSean Dague2007-12-05 19:00:29 +0000
committerSean Dague2007-12-05 19:00:29 +0000
commit4b7782127522c8c968831ef1c05e5cc30e592ffd (patch)
treefd2390b6a25439b9ebca83dc21e3268e6d6ca0b3 /OpenSim/Region/Communications/Local
parentDo not create a new asset on item metadata change (diff)
downloadopensim-SC-4b7782127522c8c968831ef1c05e5cc30e592ffd.zip
opensim-SC-4b7782127522c8c968831ef1c05e5cc30e592ffd.tar.gz
opensim-SC-4b7782127522c8c968831ef1c05e5cc30e592ffd.tar.bz2
opensim-SC-4b7782127522c8c968831ef1c05e5cc30e592ffd.tar.xz
From Justin Casey (IBM)
When using a local inventory service, this patch stops items held in the root 'my inventory' folder from 'disappearing' on server restart. They were actually still there, we just weren't retrieving them. >From looking at the grid inventory server, the bug probably still exists in there. But I wanted to get this patch in first and consult with MW about the grid fix (he may be planning to change the area extensively soon).
Diffstat (limited to 'OpenSim/Region/Communications/Local')
-rw-r--r--OpenSim/Region/Communications/Local/LocalInventoryService.cs40
1 files changed, 24 insertions, 16 deletions
diff --git a/OpenSim/Region/Communications/Local/LocalInventoryService.cs b/OpenSim/Region/Communications/Local/LocalInventoryService.cs
index 40e6601..e82d267 100644
--- a/OpenSim/Region/Communications/Local/LocalInventoryService.cs
+++ b/OpenSim/Region/Communications/Local/LocalInventoryService.cs
@@ -36,10 +36,6 @@ namespace OpenSim.Region.Communications.Local
36{ 36{
37 public class LocalInventoryService : InventoryServiceBase 37 public class LocalInventoryService : InventoryServiceBase
38 { 38 {
39 public LocalInventoryService()
40 {
41 }
42
43 public override void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, 39 public override void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack,
44 InventoryItemInfo itemCallBack) 40 InventoryItemInfo itemCallBack)
45 { 41 {
@@ -51,9 +47,7 @@ namespace OpenSim.Region.Communications.Local
51 { 47 {
52 if (folder.parentID == LLUUID.Zero) 48 if (folder.parentID == LLUUID.Zero)
53 { 49 {
54 InventoryFolderImpl newfolder = new InventoryFolderImpl(folder); 50 rootFolder = RequestInventoryFolder(userID, folder, folderCallBack, itemCallBack);
55 rootFolder = newfolder;
56 folderCallBack(userID, newfolder);
57 } 51 }
58 } 52 }
59 53
@@ -63,14 +57,7 @@ namespace OpenSim.Region.Communications.Local
63 { 57 {
64 if (folder.folderID != rootFolder.folderID) 58 if (folder.folderID != rootFolder.folderID)
65 { 59 {
66 InventoryFolderImpl newfolder = new InventoryFolderImpl(folder); 60 RequestInventoryFolder(userID, folder, folderCallBack, itemCallBack);
67 folderCallBack(userID, newfolder);
68
69 List<InventoryItemBase> items = RequestFolderItems(newfolder.folderID);
70 foreach (InventoryItemBase item in items)
71 {
72 itemCallBack(userID, item);
73 }
74 } 61 }
75 } 62 }
76 } 63 }
@@ -90,5 +77,26 @@ namespace OpenSim.Region.Communications.Local
90 { 77 {
91 DeleteItem(item); 78 DeleteItem(item);
92 } 79 }
80
81 /// <summary>
82 /// Send the given inventory folder and its item contents back to the requester.
83 /// </summary>
84 /// <param name="userID"></param>
85 /// <param name="folder"></param>
86 private InventoryFolderImpl RequestInventoryFolder(LLUUID userID, InventoryFolderBase folder,
87 InventoryFolderInfo folderCallBack,
88 InventoryItemInfo itemCallBack)
89 {
90 InventoryFolderImpl newFolder = new InventoryFolderImpl(folder);
91 folderCallBack(userID, newFolder);
92
93 List<InventoryItemBase> items = RequestFolderItems(newFolder.folderID);
94 foreach (InventoryItemBase item in items)
95 {
96 itemCallBack(userID, item);
97 }
98
99 return newFolder;
100 }
93 } 101 }
94} \ No newline at end of file 102}