diff options
Diffstat (limited to 'OpenSim/Region/Framework')
6 files changed, 118 insertions, 306 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs index 4224198..5d65f98 100644 --- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs +++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs | |||
@@ -201,31 +201,31 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid | |||
201 | } | 201 | } |
202 | } | 202 | } |
203 | 203 | ||
204 | public InventoryItemBase Get(InventoryItemBase item, UUID rootFolder, CachedUserInfo userInfo) | 204 | //public InventoryItemBase Get(InventoryItemBase item, UUID rootFolder, CachedUserInfo userInfo) |
205 | { | 205 | //{ |
206 | InventoryClient invCli = null; | 206 | // InventoryClient invCli = null; |
207 | string inventoryURL = UserInventoryURL(item.Owner); | 207 | // string inventoryURL = UserInventoryURL(item.Owner); |
208 | if (!m_inventoryServers.TryGetValue(inventoryURL, out invCli)) | 208 | // if (!m_inventoryServers.TryGetValue(inventoryURL, out invCli)) |
209 | { | 209 | // { |
210 | m_log.Debug("[HGScene]: Starting new InventorytClient for " + inventoryURL); | 210 | // m_log.Debug("[HGScene]: Starting new InventorytClient for " + inventoryURL); |
211 | invCli = new InventoryClient(inventoryURL); | 211 | // invCli = new InventoryClient(inventoryURL); |
212 | m_inventoryServers.Add(inventoryURL, invCli); | 212 | // m_inventoryServers.Add(inventoryURL, invCli); |
213 | } | 213 | // } |
214 | 214 | ||
215 | item = invCli.GetInventoryItem(item); | 215 | // item = invCli.GetInventoryItem(item); |
216 | if (item != null) | 216 | // if (item != null) |
217 | { | 217 | // { |
218 | // Change the folder, stick it in root folder, all items flattened out here in this region cache | 218 | // // Change the folder, stick it in root folder, all items flattened out here in this region cache |
219 | item.Folder = rootFolder; | 219 | // item.Folder = rootFolder; |
220 | //userInfo.AddItem(item); don't use this, it calls back to the inventory server | 220 | // //userInfo.AddItem(item); don't use this, it calls back to the inventory server |
221 | lock (userInfo.RootFolder.Items) | 221 | // lock (userInfo.RootFolder.Items) |
222 | { | 222 | // { |
223 | userInfo.RootFolder.Items[item.ID] = item; | 223 | // userInfo.RootFolder.Items[item.ID] = item; |
224 | } | 224 | // } |
225 | 225 | ||
226 | } | 226 | // } |
227 | return item; | 227 | // return item; |
228 | } | 228 | //} |
229 | 229 | ||
230 | public void Post(UUID assetID, UUID ownerID) | 230 | public void Post(UUID assetID, UUID ownerID) |
231 | { | 231 | { |
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs index cb6794e..1b93f46 100644 --- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGScene.Inventory.cs | |||
@@ -117,25 +117,20 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid | |||
117 | 117 | ||
118 | if (fromTaskID.Equals(UUID.Zero)) | 118 | if (fromTaskID.Equals(UUID.Zero)) |
119 | { | 119 | { |
120 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | 120 | InventoryItemBase item = new InventoryItemBase(itemID); |
121 | if (userInfo != null) | 121 | item.Owner = remoteClient.AgentId; |
122 | item = InventoryService.QueryItem(item); | ||
123 | //if (item == null) | ||
124 | //{ // Fetch the item | ||
125 | // item = new InventoryItemBase(); | ||
126 | // item.Owner = remoteClient.AgentId; | ||
127 | // item.ID = itemID; | ||
128 | // item = m_assMapper.Get(item, userInfo.RootFolder.ID, userInfo); | ||
129 | //} | ||
130 | if (item != null) | ||
122 | { | 131 | { |
123 | if (userInfo.RootFolder != null) | 132 | m_assMapper.Get(item.AssetID, remoteClient.AgentId); |
124 | { | 133 | |
125 | InventoryItemBase item = userInfo.RootFolder.FindItem(itemID); | ||
126 | if (item == null) | ||
127 | { // Fetch the item | ||
128 | item = new InventoryItemBase(); | ||
129 | item.Owner = remoteClient.AgentId; | ||
130 | item.ID = itemID; | ||
131 | item = m_assMapper.Get(item, userInfo.RootFolder.ID, userInfo); | ||
132 | } | ||
133 | if (item != null) | ||
134 | { | ||
135 | m_assMapper.Get(item.AssetID, remoteClient.AgentId); | ||
136 | |||
137 | } | ||
138 | } | ||
139 | } | 134 | } |
140 | } | 135 | } |
141 | 136 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 80f71b3..cd91e8c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -558,24 +558,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
558 | 558 | ||
559 | if (item == null) | 559 | if (item == null) |
560 | { | 560 | { |
561 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(oldAgentID); | 561 | item = InventoryService.QueryItem(new InventoryItemBase(oldItemID)); |
562 | if (userInfo == null) | ||
563 | { | ||
564 | m_log.Error("[AGENT INVENTORY]: Failed to find user " + oldAgentID.ToString()); | ||
565 | return; | ||
566 | } | ||
567 | |||
568 | if (userInfo.RootFolder != null) | ||
569 | { | ||
570 | item = userInfo.RootFolder.FindItem(oldItemID); | ||
571 | 562 | ||
572 | if (item == null) | 563 | if (item == null) |
573 | { | ||
574 | m_log.Error("[AGENT INVENTORY]: Failed to find item " + oldItemID.ToString()); | ||
575 | return; | ||
576 | } | ||
577 | } | ||
578 | else | ||
579 | { | 564 | { |
580 | m_log.Error("[AGENT INVENTORY]: Failed to find item " + oldItemID.ToString()); | 565 | m_log.Error("[AGENT INVENTORY]: Failed to find item " + oldItemID.ToString()); |
581 | return; | 566 | return; |
@@ -822,28 +807,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
822 | /// <param name="folderID"></param> | 807 | /// <param name="folderID"></param> |
823 | private void RemoveInventoryFolder(IClientAPI remoteClient, UUID folderID) | 808 | private void RemoveInventoryFolder(IClientAPI remoteClient, UUID folderID) |
824 | { | 809 | { |
825 | CachedUserInfo userInfo | 810 | // Unclear is this handler is ever called by the Linden client, but it might |
826 | = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | ||
827 | |||
828 | if (userInfo == null) | ||
829 | { | ||
830 | m_log.Warn("[AGENT INVENTORY]: Failed to find user " + remoteClient.AgentId.ToString()); | ||
831 | return; | ||
832 | } | ||
833 | 811 | ||
834 | if (userInfo.RootFolder != null) | 812 | InventoryFolderBase folder = new InventoryFolderBase(folderID); |
813 | folder.Owner = remoteClient.AgentId; | ||
814 | InventoryFolderBase trash = InventoryService.GetFolderForType(remoteClient.AgentId, AssetType.TrashFolder); | ||
815 | if (trash != null) | ||
835 | { | 816 | { |
836 | InventoryItemBase folder = userInfo.RootFolder.FindItem(folderID); | 817 | folder.ParentID = trash.ID; |
837 | 818 | InventoryService.MoveFolder(folder); | |
838 | if (folder != null) | ||
839 | { | ||
840 | m_log.WarnFormat( | ||
841 | "[AGENT INVENTORY]: Remove folder not implemented in request by {0} {1} for {2}", | ||
842 | remoteClient.Name, remoteClient.AgentId, folderID); | ||
843 | |||
844 | // doesn't work just yet, commented out. will fix in next patch. | ||
845 | // userInfo.DeleteItem(folder); | ||
846 | } | ||
847 | } | 819 | } |
848 | } | 820 | } |
849 | 821 | ||
@@ -1060,20 +1032,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1060 | return MoveTaskInventoryItem(avatar.ControllingClient, folderId, part, itemId); | 1032 | return MoveTaskInventoryItem(avatar.ControllingClient, folderId, part, itemId); |
1061 | } | 1033 | } |
1062 | else | 1034 | else |
1063 | { | 1035 | { |
1064 | CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(avatarId); | ||
1065 | if (profile == null || profile.RootFolder == null) | ||
1066 | { | ||
1067 | m_log.ErrorFormat( | ||
1068 | "[PRIM INVENTORY]: " + | ||
1069 | "Avatar {0} cannot be found to add item", | ||
1070 | avatarId); | ||
1071 | return null; | ||
1072 | } | ||
1073 | |||
1074 | if (!profile.HasReceivedInventory) | ||
1075 | profile.FetchInventory(); | ||
1076 | |||
1077 | InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(avatarId, part, itemId); | 1036 | InventoryItemBase agentItem = CreateAgentInventoryItemFromTask(avatarId, part, itemId); |
1078 | 1037 | ||
1079 | if (agentItem == null) | 1038 | if (agentItem == null) |
@@ -1265,39 +1224,33 @@ namespace OpenSim.Region.Framework.Scenes | |||
1265 | UUID copyID = UUID.Random(); | 1224 | UUID copyID = UUID.Random(); |
1266 | if (itemID != UUID.Zero) | 1225 | if (itemID != UUID.Zero) |
1267 | { | 1226 | { |
1268 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | 1227 | InventoryItemBase item = InventoryService.QueryItem(new InventoryItemBase(itemID)); |
1269 | 1228 | ||
1270 | if (userInfo != null && userInfo.RootFolder != null) | 1229 | // Try library |
1230 | if (null == item) | ||
1271 | { | 1231 | { |
1272 | InventoryItemBase item = userInfo.RootFolder.FindItem(itemID); | 1232 | item = CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID); |
1273 | 1233 | } | |
1274 | // Try library | ||
1275 | // XXX clumsy, possibly should be one call | ||
1276 | if (null == item) | ||
1277 | { | ||
1278 | item = CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID); | ||
1279 | } | ||
1280 | 1234 | ||
1281 | if (item != null) | 1235 | if (item != null) |
1282 | { | 1236 | { |
1283 | part.ParentGroup.AddInventoryItem(remoteClient, primLocalID, item, copyID); | 1237 | part.ParentGroup.AddInventoryItem(remoteClient, primLocalID, item, copyID); |
1284 | m_log.InfoFormat( | 1238 | m_log.InfoFormat( |
1285 | "[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}", | 1239 | "[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}", |
1286 | item.Name, primLocalID, remoteClient.Name); | 1240 | item.Name, primLocalID, remoteClient.Name); |
1287 | part.GetProperties(remoteClient); | 1241 | part.GetProperties(remoteClient); |
1288 | if (!Permissions.BypassPermissions()) | 1242 | if (!Permissions.BypassPermissions()) |
1289 | { | ||
1290 | if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) | ||
1291 | RemoveInventoryItem(remoteClient, itemID); | ||
1292 | } | ||
1293 | } | ||
1294 | else | ||
1295 | { | 1243 | { |
1296 | m_log.ErrorFormat( | 1244 | if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) |
1297 | "[PRIM INVENTORY]: Could not find inventory item {0} to update for {1}!", | 1245 | RemoveInventoryItem(remoteClient, itemID); |
1298 | itemID, remoteClient.Name); | ||
1299 | } | 1246 | } |
1300 | } | 1247 | } |
1248 | else | ||
1249 | { | ||
1250 | m_log.ErrorFormat( | ||
1251 | "[PRIM INVENTORY]: Could not find inventory item {0} to update for {1}!", | ||
1252 | itemID, remoteClient.Name); | ||
1253 | } | ||
1301 | } | 1254 | } |
1302 | } | 1255 | } |
1303 | else // Updating existing item with new perms etc | 1256 | else // Updating existing item with new perms etc |
@@ -1334,53 +1287,48 @@ namespace OpenSim.Region.Framework.Scenes | |||
1334 | 1287 | ||
1335 | if (itemID != UUID.Zero) // transferred from an avatar inventory to the prim's inventory | 1288 | if (itemID != UUID.Zero) // transferred from an avatar inventory to the prim's inventory |
1336 | { | 1289 | { |
1337 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | 1290 | InventoryItemBase item = InventoryService.QueryItem(new InventoryItemBase(itemID)); |
1338 | 1291 | ||
1339 | if (userInfo != null && userInfo.RootFolder != null) | 1292 | // Try library |
1293 | // XXX clumsy, possibly should be one call | ||
1294 | if (null == item) | ||
1340 | { | 1295 | { |
1341 | InventoryItemBase item = userInfo.RootFolder.FindItem(itemID); | 1296 | item = CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID); |
1342 | 1297 | } | |
1343 | // Try library | ||
1344 | // XXX clumsy, possibly should be one call | ||
1345 | if (null == item) | ||
1346 | { | ||
1347 | item = CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID); | ||
1348 | } | ||
1349 | 1298 | ||
1350 | if (item != null) | 1299 | if (item != null) |
1300 | { | ||
1301 | SceneObjectPart part = GetSceneObjectPart(localID); | ||
1302 | if (part != null) | ||
1351 | { | 1303 | { |
1352 | SceneObjectPart part = GetSceneObjectPart(localID); | 1304 | if (!Permissions.CanEditObjectInventory(part.UUID, remoteClient.AgentId)) |
1353 | if (part != null) | 1305 | return; |
1354 | { | ||
1355 | if (!Permissions.CanEditObjectInventory(part.UUID, remoteClient.AgentId)) | ||
1356 | return; | ||
1357 | 1306 | ||
1358 | part.ParentGroup.AddInventoryItem(remoteClient, localID, item, copyID); | 1307 | part.ParentGroup.AddInventoryItem(remoteClient, localID, item, copyID); |
1359 | // TODO: switch to posting on_rez here when scripts | 1308 | // TODO: switch to posting on_rez here when scripts |
1360 | // have state in inventory | 1309 | // have state in inventory |
1361 | part.Inventory.CreateScriptInstance(copyID, 0, false, DefaultScriptEngine, 0); | 1310 | part.Inventory.CreateScriptInstance(copyID, 0, false, DefaultScriptEngine, 0); |
1362 | 1311 | ||
1363 | // m_log.InfoFormat("[PRIMINVENTORY]: " + | 1312 | // m_log.InfoFormat("[PRIMINVENTORY]: " + |
1364 | // "Rezzed script {0} into prim local ID {1} for user {2}", | 1313 | // "Rezzed script {0} into prim local ID {1} for user {2}", |
1365 | // item.inventoryName, localID, remoteClient.Name); | 1314 | // item.inventoryName, localID, remoteClient.Name); |
1366 | part.GetProperties(remoteClient); | 1315 | part.GetProperties(remoteClient); |
1367 | } | ||
1368 | else | ||
1369 | { | ||
1370 | m_log.ErrorFormat( | ||
1371 | "[PRIM INVENTORY]: " + | ||
1372 | "Could not rez script {0} into prim local ID {1} for user {2}" | ||
1373 | + " because the prim could not be found in the region!", | ||
1374 | item.Name, localID, remoteClient.Name); | ||
1375 | } | ||
1376 | } | 1316 | } |
1377 | else | 1317 | else |
1378 | { | 1318 | { |
1379 | m_log.ErrorFormat( | 1319 | m_log.ErrorFormat( |
1380 | "[PRIM INVENTORY]: Could not find script inventory item {0} to rez for {1}!", | 1320 | "[PRIM INVENTORY]: " + |
1381 | itemID, remoteClient.Name); | 1321 | "Could not rez script {0} into prim local ID {1} for user {2}" |
1322 | + " because the prim could not be found in the region!", | ||
1323 | item.Name, localID, remoteClient.Name); | ||
1382 | } | 1324 | } |
1383 | } | 1325 | } |
1326 | else | ||
1327 | { | ||
1328 | m_log.ErrorFormat( | ||
1329 | "[PRIM INVENTORY]: Could not find script inventory item {0} to rez for {1}!", | ||
1330 | itemID, remoteClient.Name); | ||
1331 | } | ||
1384 | } | 1332 | } |
1385 | else // script has been rezzed directly into a prim's inventory | 1333 | else // script has been rezzed directly into a prim's inventory |
1386 | { | 1334 | { |
@@ -1670,26 +1618,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1670 | } | 1618 | } |
1671 | } | 1619 | } |
1672 | 1620 | ||
1673 | private bool WaitForInventory(CachedUserInfo info) | ||
1674 | { | ||
1675 | // 200 Seconds wait. This is called in the context of the | ||
1676 | // background delete thread, so we can afford to waste time | ||
1677 | // here. | ||
1678 | // | ||
1679 | int count = 200; | ||
1680 | |||
1681 | while (count > 0) | ||
1682 | { | ||
1683 | System.Threading.Thread.Sleep(100); | ||
1684 | count--; | ||
1685 | if (info.HasReceivedInventory) | ||
1686 | return true; | ||
1687 | } | ||
1688 | m_log.DebugFormat("Timed out waiting for inventory of user {0}", | ||
1689 | info.UserProfile.ID.ToString()); | ||
1690 | return false; | ||
1691 | } | ||
1692 | |||
1693 | /// <summary> | 1621 | /// <summary> |
1694 | /// Delete a scene object from a scene and place in the given avatar's inventory. | 1622 | /// Delete a scene object from a scene and place in the given avatar's inventory. |
1695 | /// Returns the UUID of the newly created asset. | 1623 | /// Returns the UUID of the newly created asset. |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index ba858ed..e2debe5 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -382,31 +382,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
382 | return; | 382 | return; |
383 | } | 383 | } |
384 | 384 | ||
385 | CachedUserInfo userProfile = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | 385 | InventoryItemBase item = InventoryService.QueryItem(new InventoryItemBase(itemID)); |
386 | 386 | ||
387 | if (null == userProfile) | 387 | if (item != null) |
388 | { | 388 | { |
389 | m_log.ErrorFormat( | 389 | remoteClient.SendInventoryItemDetails(ownerID, item); |
390 | "[AGENT INVENTORY]: Could not find user profile for {0} {1}", | ||
391 | remoteClient.Name, remoteClient.AgentId); | ||
392 | return; | ||
393 | } | ||
394 | |||
395 | if (userProfile.HasReceivedInventory) | ||
396 | { | ||
397 | InventoryItemBase item = null; | ||
398 | if (userProfile.RootFolder == null) | ||
399 | m_log.ErrorFormat( | ||
400 | "[AGENT INVENTORY]: User {0} {1} does not have a root folder.", | ||
401 | remoteClient.Name, remoteClient.AgentId); | ||
402 | else | ||
403 | item = userProfile.RootFolder.FindItem(itemID); | ||
404 | |||
405 | if (item != null) | ||
406 | { | ||
407 | remoteClient.SendInventoryItemDetails(ownerID, item); | ||
408 | } | ||
409 | } | 390 | } |
391 | // else shouldn't we send an alert message? | ||
410 | } | 392 | } |
411 | 393 | ||
412 | /// <summary> | 394 | /// <summary> |
@@ -442,6 +424,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
442 | /// Handle the caps inventory descendents fetch. | 424 | /// Handle the caps inventory descendents fetch. |
443 | /// | 425 | /// |
444 | /// Since the folder structure is sent to the client on login, I believe we only need to handle items. | 426 | /// Since the folder structure is sent to the client on login, I believe we only need to handle items. |
427 | /// Diva comment 8/13/2009: what if someone gave us a folder in the meantime?? | ||
445 | /// </summary> | 428 | /// </summary> |
446 | /// <param name="agentID"></param> | 429 | /// <param name="agentID"></param> |
447 | /// <param name="folderID"></param> | 430 | /// <param name="folderID"></param> |
@@ -467,59 +450,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
467 | { | 450 | { |
468 | return fold.RequestListOfItems(); | 451 | return fold.RequestListOfItems(); |
469 | } | 452 | } |
470 | |||
471 | CachedUserInfo userProfile = CommsManager.UserProfileCacheService.GetUserDetails(agentID); | ||
472 | |||
473 | if (null == userProfile) | ||
474 | { | ||
475 | m_log.ErrorFormat("[AGENT INVENTORY]: Could not find user profile for {0}", agentID); | ||
476 | return null; | ||
477 | } | ||
478 | |||
479 | // XXX: When a client crosses into a scene, their entire inventory is fetched | ||
480 | // asynchronously. If the client makes a request before the inventory is received, we need | ||
481 | // to give the inventory a chance to come in. | ||
482 | // | ||
483 | // This is a crude way of dealing with that by retrying the lookup. It's not quite as bad | ||
484 | // in CAPS as doing this with the udp request, since here it won't hold up other packets. | ||
485 | // In fact, here we'll be generous and try for longer. | ||
486 | if (!userProfile.HasReceivedInventory) | ||
487 | { | ||
488 | int attempts = 0; | ||
489 | while (attempts++ < 30) | ||
490 | { | ||
491 | m_log.DebugFormat( | ||
492 | "[INVENTORY CACHE]: Poll number {0} for inventory items in folder {1} for user {2}", | ||
493 | attempts, folderID, agentID); | ||
494 | 453 | ||
495 | Thread.Sleep(2000); | 454 | InventoryCollection contents = InventoryService.GetFolderContent(agentID, folderID); |
496 | 455 | return contents.Items; | |
497 | if (userProfile.HasReceivedInventory) | ||
498 | { | ||
499 | break; | ||
500 | } | ||
501 | } | ||
502 | } | ||
503 | 456 | ||
504 | if (userProfile.HasReceivedInventory) | ||
505 | { | ||
506 | if ((fold = userProfile.RootFolder.FindFolder(folderID)) != null) | ||
507 | { | ||
508 | return fold.RequestListOfItems(); | ||
509 | } | ||
510 | else | ||
511 | { | ||
512 | m_log.WarnFormat( | ||
513 | "[AGENT INVENTORY]: Could not find folder {0} requested by user {1}", | ||
514 | folderID, agentID); | ||
515 | return null; | ||
516 | } | ||
517 | } | ||
518 | else | ||
519 | { | ||
520 | m_log.ErrorFormat("[INVENTORY CACHE]: Could not find root folder for user {0}", agentID); | ||
521 | return null; | ||
522 | } | ||
523 | } | 457 | } |
524 | 458 | ||
525 | /// <summary> | 459 | /// <summary> |
@@ -579,34 +513,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
579 | } | 513 | } |
580 | } | 514 | } |
581 | 515 | ||
582 | /// <summary> | ||
583 | /// Handle an inventory folder move request from the client. | ||
584 | /// </summary> | ||
585 | /// <param name="remoteClient"></param> | ||
586 | /// <param name="folderID"></param> | ||
587 | /// <param name="parentID"></param> | ||
588 | public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID) | 516 | public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID) |
589 | { | 517 | { |
590 | CachedUserInfo userProfile = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | ||
591 | |||
592 | if (null == userProfile) | ||
593 | { | ||
594 | m_log.ErrorFormat( | ||
595 | "[AGENT INVENTORY]: Could not find user profile for {0} {1}", | ||
596 | remoteClient.Name, remoteClient.AgentId); | ||
597 | return; | ||
598 | } | ||
599 | |||
600 | if (!userProfile.MoveFolder(folderID, parentID)) | ||
601 | { | ||
602 | m_log.ErrorFormat( | ||
603 | "[AGENT INVENTORY]: Failed to move folder {0} to {1} for user {2}", | ||
604 | folderID, parentID, remoteClient.Name); | ||
605 | } | ||
606 | } | ||
607 | |||
608 | public void HandleMoveInventoryFolder2(IClientAPI remoteClient, UUID folderID, UUID parentID) | ||
609 | { | ||
610 | InventoryFolderBase folder = new InventoryFolderBase(folderID); | 518 | InventoryFolderBase folder = new InventoryFolderBase(folderID); |
611 | folder = InventoryService.QueryFolder(folder); | 519 | folder = InventoryService.QueryFolder(folder); |
612 | if (folder != null) | 520 | if (folder != null) |
@@ -628,27 +536,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
628 | /// </summary> | 536 | /// </summary> |
629 | /// <param name="remoteClient"></param> | 537 | /// <param name="remoteClient"></param> |
630 | /// <param name="folderID"></param> | 538 | /// <param name="folderID"></param> |
631 | public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID) | ||
632 | { | ||
633 | CachedUserInfo userProfile = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | ||
634 | |||
635 | if (null == userProfile) | ||
636 | { | ||
637 | m_log.ErrorFormat( | ||
638 | "[AGENT INVENTORY]: Could not find user profile for {0} {1}", | ||
639 | remoteClient.Name, remoteClient.AgentId); | ||
640 | return; | ||
641 | } | ||
642 | 539 | ||
643 | if (!userProfile.PurgeFolder(folderID)) | 540 | public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID) |
644 | { | ||
645 | m_log.ErrorFormat( | ||
646 | "[AGENT INVENTORY]: Failed to purge folder for user {0} {1}", | ||
647 | remoteClient.Name, remoteClient.AgentId); | ||
648 | } | ||
649 | } | ||
650 | |||
651 | public void HandlePurgeInventoryDescendents2(IClientAPI remoteClient, UUID folderID) | ||
652 | { | 541 | { |
653 | InventoryFolderBase folder = new InventoryFolderBase(folderID); | 542 | InventoryFolderBase folder = new InventoryFolderBase(folderID); |
654 | 543 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index 0140faa..af2753c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -1249,11 +1249,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1249 | } | 1249 | } |
1250 | else // Not successful | 1250 | else // Not successful |
1251 | { | 1251 | { |
1252 | CachedUserInfo userInfo = m_commsProvider.UserProfileCacheService.GetUserDetails(agent.UUID); | 1252 | //CachedUserInfo userInfo = m_commsProvider.UserProfileCacheService.GetUserDetails(agent.UUID); |
1253 | if (userInfo != null) | 1253 | //if (userInfo != null) |
1254 | { | 1254 | //{ |
1255 | userInfo.FetchInventory(); | 1255 | // userInfo.FetchInventory(); |
1256 | } | 1256 | //} |
1257 | agent.RestoreInCurrentScene(); | 1257 | agent.RestoreInCurrentScene(); |
1258 | } | 1258 | } |
1259 | // In any case | 1259 | // In any case |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 4695df7..fc8b62e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -833,11 +833,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
833 | 833 | ||
834 | m_scene.SwapRootAgentCount(false); | 834 | m_scene.SwapRootAgentCount(false); |
835 | 835 | ||
836 | CachedUserInfo userInfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(m_uuid); | 836 | //CachedUserInfo userInfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(m_uuid); |
837 | if (userInfo != null) | 837 | //if (userInfo != null) |
838 | userInfo.FetchInventory(); | 838 | // userInfo.FetchInventory(); |
839 | else | 839 | //else |
840 | m_log.ErrorFormat("[SCENE]: Could not find user info for {0} when making it a root agent", m_uuid); | 840 | // m_log.ErrorFormat("[SCENE]: Could not find user info for {0} when making it a root agent", m_uuid); |
841 | 841 | ||
842 | // On the next prim update, all objects will be sent | 842 | // On the next prim update, all objects will be sent |
843 | // | 843 | // |