diff options
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 |