diff options
author | Teravus Ovares | 2008-05-16 23:11:00 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-05-16 23:11:00 +0000 |
commit | aa5197304e2bb8c6b2f7bf3c8e86256042cf23b8 (patch) | |
tree | c55e7c94e4978bbc073947da44b383c692d8f5c6 /OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | |
parent | minor change to justin's previous fix that should still (diff) | |
download | opensim-SC-aa5197304e2bb8c6b2f7bf3c8e86256042cf23b8.zip opensim-SC-aa5197304e2bb8c6b2f7bf3c8e86256042cf23b8.tar.gz opensim-SC-aa5197304e2bb8c6b2f7bf3c8e86256042cf23b8.tar.bz2 opensim-SC-aa5197304e2bb8c6b2f7bf3c8e86256042cf23b8.tar.xz |
* Committing patch from mantis 0001297: [PATCH] Fix behavior of child prim inventories. Also enables 'New Script' button. from Melanie. Thanks Melanie!
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index b151d75..0444685 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | |||
@@ -42,6 +42,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
43 | 43 | ||
44 | private string m_inventoryFileName = String.Empty; | 44 | private string m_inventoryFileName = String.Empty; |
45 | private int m_inventoryFileNameSerial = 0; | ||
45 | 46 | ||
46 | /// <summary> | 47 | /// <summary> |
47 | /// Exposing this is not particularly good, but it's one of the least evils at the moment to see | 48 | /// Exposing this is not particularly good, but it's one of the least evils at the moment to see |
@@ -444,6 +445,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
444 | return -1; | 445 | return -1; |
445 | } | 446 | } |
446 | 447 | ||
448 | public string GetInventoryFileName() | ||
449 | { | ||
450 | if(m_inventoryFileName == String.Empty) | ||
451 | m_inventoryFileName = "inventory_" + LLUUID.Random().ToString() + ".tmp"; | ||
452 | if(m_inventoryFileNameSerial < m_inventorySerial) | ||
453 | { | ||
454 | m_inventoryFileName = "inventory_" + LLUUID.Random().ToString() + ".tmp"; | ||
455 | } | ||
456 | return m_inventoryFileName; | ||
457 | } | ||
458 | |||
447 | /// <summary> | 459 | /// <summary> |
448 | /// Return the name with which a client can request a xfer of this prim's inventory metadata | 460 | /// Return the name with which a client can request a xfer of this prim's inventory metadata |
449 | /// </summary> | 461 | /// </summary> |
@@ -458,7 +470,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
458 | if (m_inventorySerial > 0) | 470 | if (m_inventorySerial > 0) |
459 | { | 471 | { |
460 | client.SendTaskInventory(m_uuid, (short)m_inventorySerial, | 472 | client.SendTaskInventory(m_uuid, (short)m_inventorySerial, |
461 | Helpers.StringToField(m_inventoryFileName)); | 473 | Helpers.StringToField(GetInventoryFileName())); |
462 | return true; | 474 | return true; |
463 | } | 475 | } |
464 | else | 476 | else |