aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs35
1 files changed, 27 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 953dce7..0dc3139 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -449,7 +449,7 @@ namespace OpenSim.Region.Environment.Scenes
449 /// Create a new inventory item. 449 /// Create a new inventory item.
450 /// </summary> 450 /// </summary>
451 /// <param name="remoteClient"></param> 451 /// <param name="remoteClient"></param>
452 /// <param name="transActionID"></param> 452 /// <param name="transactionID"></param>
453 /// <param name="folderID"></param> 453 /// <param name="folderID"></param>
454 /// <param name="callbackID"></param> 454 /// <param name="callbackID"></param>
455 /// <param name="description"></param> 455 /// <param name="description"></param>
@@ -458,14 +458,16 @@ namespace OpenSim.Region.Environment.Scenes
458 /// <param name="type"></param> 458 /// <param name="type"></param>
459 /// <param name="wearableType"></param> 459 /// <param name="wearableType"></param>
460 /// <param name="nextOwnerMask"></param> 460 /// <param name="nextOwnerMask"></param>
461 public void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID, 461 public void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID,
462 uint callbackID, string description, string name, sbyte invType, 462 uint callbackID, string description, string name, sbyte invType,
463 sbyte assetType, 463 sbyte assetType,
464 byte wearableType, uint nextOwnerMask) 464 byte wearableType, uint nextOwnerMask)
465 { 465 {
466 if (transActionID == LLUUID.Zero) 466 if (transactionID == LLUUID.Zero)
467 { 467 {
468 CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); 468 CachedUserInfo userInfo
469 = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
470
469 if (userInfo != null) 471 if (userInfo != null)
470 { 472 {
471 AssetBase asset = CreateAsset(name, description, invType, assetType, null); 473 AssetBase asset = CreateAsset(name, description, invType, assetType, null);
@@ -473,13 +475,30 @@ namespace OpenSim.Region.Environment.Scenes
473 475
474 CreateNewInventoryItem(remoteClient, folderID, callbackID, asset, nextOwnerMask); 476 CreateNewInventoryItem(remoteClient, folderID, callbackID, asset, nextOwnerMask);
475 } 477 }
478 else
479 {
480 m_log.ErrorFormat(
481 "userInfo for agent uuid {0} unexpectedly null in CreateNewInventoryItem",
482 remoteClient.AgentId);
483 }
476 } 484 }
477 else 485 else
478 { 486 {
479 CommsManager.TransactionsManager.HandleInventoryFromTransaction(remoteClient, transActionID, folderID, 487 AgentAssetTransactions transactions
480 callbackID, description, name, invType, 488 = CommsManager.TransactionsManager.GetUserTransactions(remoteClient.AgentId);
481 assetType, wearableType, nextOwnerMask); 489
482 //System.Console.WriteLine("request to create inventory item from transaction " + transActionID); 490 if (transactions != null)
491 {
492 transactions.RequestCreateInventoryItem(
493 remoteClient, transactionID, folderID, callbackID, description,
494 name, invType, assetType, wearableType, nextOwnerMask);
495 }
496 else
497 {
498 m_log.ErrorFormat(
499 "Agent asset transactions for agent {0} uuid {1} in transaction uuid {2} unexpectedly null!",
500 remoteClient.Name, remoteClient.AgentId, transactionID);
501 }
483 } 502 }
484 } 503 }
485 504