diff options
author | Justin Clarke Casey | 2007-12-15 19:42:23 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2007-12-15 19:42:23 +0000 |
commit | c63369017f0ac8e204f79978f20d5c2abdf5bef2 (patch) | |
tree | 97b26f9efc262bdf0d691e84bf19f2175124984b /OpenSim/Grid/InventoryServer | |
parent | * Added support for multiple terrain blocks to be edited at the same time (diff) | |
download | opensim-SC-c63369017f0ac8e204f79978f20d5c2abdf5bef2.zip opensim-SC-c63369017f0ac8e204f79978f20d5c2abdf5bef2.tar.gz opensim-SC-c63369017f0ac8e204f79978f20d5c2abdf5bef2.tar.bz2 opensim-SC-c63369017f0ac8e204f79978f20d5c2abdf5bef2.tar.xz |
* Make inventory operations sync rather than async. This is to alleviate race conditions such as that in mantis #190
* Make inventory messages more verbose. Hopefully they aren't now too verbose
* This may resolve some grid instability but it's likely there's much more out there.
Diffstat (limited to 'OpenSim/Grid/InventoryServer')
-rw-r--r-- | OpenSim/Grid/InventoryServer/GridInventoryService.cs | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs index 6ae1d82..150a262 100644 --- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs +++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs | |||
@@ -31,6 +31,7 @@ using System.Collections.Generic; | |||
31 | using System.Text; | 31 | using System.Text; |
32 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
33 | using OpenSim.Framework.Communications; | 33 | using OpenSim.Framework.Communications; |
34 | using OpenSim.Framework.Console; | ||
34 | using libsecondlife; | 35 | using libsecondlife; |
35 | 36 | ||
36 | namespace OpenSim.Grid.InventoryServer | 37 | namespace OpenSim.Grid.InventoryServer |
@@ -105,9 +106,10 @@ namespace OpenSim.Grid.InventoryServer | |||
105 | 106 | ||
106 | public InventoryCollection GetUserInventory(Guid rawUserID) | 107 | public InventoryCollection GetUserInventory(Guid rawUserID) |
107 | { | 108 | { |
108 | Console.WriteLine("Request for Inventory for " + rawUserID.ToString()); | ||
109 | LLUUID userID = new LLUUID(rawUserID); | 109 | LLUUID userID = new LLUUID(rawUserID); |
110 | 110 | ||
111 | MainLog.Instance.Verbose("INVENTORY", "Request for inventory for " + userID.ToStringHyphenated()); | ||
112 | |||
111 | InventoryCollection invCollection = new InventoryCollection(); | 113 | InventoryCollection invCollection = new InventoryCollection(); |
112 | List<InventoryFolderBase> folders; | 114 | List<InventoryFolderBase> folders; |
113 | List<InventoryItemBase> allItems; | 115 | List<InventoryItemBase> allItems; |
@@ -124,7 +126,9 @@ namespace OpenSim.Grid.InventoryServer | |||
124 | { | 126 | { |
125 | LLUUID userID = new LLUUID(rawUserID); | 127 | LLUUID userID = new LLUUID(rawUserID); |
126 | 128 | ||
127 | Console.WriteLine("Creating New Set of Inventory Folders for " + userID.ToStringHyphenated()); | 129 | MainLog.Instance.Verbose( |
130 | "INVENTORY", "Creating new set of inventory folders for " + userID.ToStringHyphenated()); | ||
131 | |||
128 | CreateNewUserInventory(userID); | 132 | CreateNewUserInventory(userID); |
129 | return true; | 133 | return true; |
130 | } | 134 | } |
@@ -145,27 +149,49 @@ namespace OpenSim.Grid.InventoryServer | |||
145 | AddItem(item); | 149 | AddItem(item); |
146 | } | 150 | } |
147 | 151 | ||
148 | public bool AddInventoryFolder( InventoryFolderBase folder) | 152 | public bool AddInventoryFolder(InventoryFolderBase folder) |
149 | { | 153 | { |
154 | // Right now, this actions act more like an update/insert combination than a simple create. | ||
155 | MainLog.Instance.Verbose( | ||
156 | "INVENTORY", | ||
157 | "Updating in " + folder.parentID.ToStringHyphenated() | ||
158 | + ", folder " + folder.name); | ||
159 | |||
150 | AddNewInventoryFolder(folder.agentID, folder); | 160 | AddNewInventoryFolder(folder.agentID, folder); |
151 | return true; | 161 | return true; |
152 | } | 162 | } |
153 | 163 | ||
154 | public bool MoveInventoryFolder(InventoryFolderBase folder) | 164 | public bool MoveInventoryFolder(InventoryFolderBase folder) |
155 | { | 165 | { |
166 | MainLog.Instance.Verbose( | ||
167 | "INVENTORY", | ||
168 | "Moving folder " + folder.folderID | ||
169 | + " to " + folder.parentID.ToStringHyphenated()); | ||
170 | |||
156 | MoveExistingInventoryFolder(folder); | 171 | MoveExistingInventoryFolder(folder); |
157 | return true; | 172 | return true; |
158 | } | 173 | } |
159 | 174 | ||
160 | public bool AddInventoryItem( InventoryItemBase item) | 175 | public bool AddInventoryItem( InventoryItemBase item) |
161 | { | 176 | { |
162 | Console.WriteLine("creating new item for " + item.avatarID.ToString()); | 177 | // Right now, this actions act more like an update/insert combination than a simple create. |
178 | MainLog.Instance.Verbose( | ||
179 | "INVENTORY", | ||
180 | "Updating in " + item.parentFolderID.ToStringHyphenated() | ||
181 | + ", item " + item.inventoryName); | ||
182 | |||
163 | AddNewInventoryItem(item.avatarID, item); | 183 | AddNewInventoryItem(item.avatarID, item); |
164 | return true; | 184 | return true; |
165 | } | 185 | } |
166 | 186 | ||
167 | public override void DeleteInventoryItem(LLUUID userID, InventoryItemBase item) | 187 | public override void DeleteInventoryItem(LLUUID userID, InventoryItemBase item) |
168 | { | 188 | { |
189 | // extra spaces to align with other inventory messages | ||
190 | MainLog.Instance.Verbose( | ||
191 | "INVENTORY", | ||
192 | "Deleting in " + item.parentFolderID.ToStringHyphenated() | ||
193 | + ", item " + item.inventoryName); | ||
194 | |||
169 | DeleteItem(item); | 195 | DeleteItem(item); |
170 | } | 196 | } |
171 | 197 | ||