diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index f6b690c..4edc220 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -988,11 +988,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
988 | 988 | ||
989 | private bool CreateInventoryFileName() | 989 | private bool CreateInventoryFileName() |
990 | { | 990 | { |
991 | // m_log.DebugFormat( | ||
992 | // "[PRIM INVENTORY]: Creating inventory file for {0} {1} {2}, serial {3}", | ||
993 | // m_part.Name, m_part.UUID, m_part.LocalId, m_inventorySerial); | ||
994 | |||
991 | if (m_inventoryFileName == String.Empty || | 995 | if (m_inventoryFileName == String.Empty || |
992 | m_inventoryFileNameSerial < m_inventorySerial) | 996 | m_inventoryFileNameSerial < m_inventorySerial) |
993 | { | 997 | { |
994 | m_inventoryFileName = "inventory_" + UUID.Random().ToString() + ".tmp"; | 998 | m_inventoryFileName = "inventory_" + UUID.Random().ToString() + ".tmp"; |
995 | m_inventoryFileNameSerial = m_inventorySerial; | 999 | m_inventoryFileNameSerial = m_inventorySerial; |
1000 | |||
996 | return true; | 1001 | return true; |
997 | } | 1002 | } |
998 | 1003 | ||
@@ -1025,6 +1030,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1025 | return; | 1030 | return; |
1026 | } | 1031 | } |
1027 | 1032 | ||
1033 | if (m_items.Count == 0) // No inventory | ||
1034 | { | ||
1035 | client.SendTaskInventory(m_part.UUID, 0, new byte[0]); | ||
1036 | return; | ||
1037 | } | ||
1038 | |||
1028 | if (!changed) | 1039 | if (!changed) |
1029 | { | 1040 | { |
1030 | if (m_inventoryFileData.Length > 2) | 1041 | if (m_inventoryFileData.Length > 2) |
@@ -1096,10 +1107,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1096 | if (m_inventoryFileData.Length > 2) | 1107 | if (m_inventoryFileData.Length > 2) |
1097 | { | 1108 | { |
1098 | xferManager.AddNewFile(m_inventoryFileName, m_inventoryFileData); | 1109 | xferManager.AddNewFile(m_inventoryFileName, m_inventoryFileData); |
1110 | client.SendTaskInventory(m_part.UUID, (short)m_inventorySerial, | ||
1111 | Util.StringToBytes256(m_inventoryFileName)); | ||
1112 | return; | ||
1099 | } | 1113 | } |
1100 | 1114 | ||
1101 | client.SendTaskInventory(m_part.UUID, (short)m_inventorySerial, | 1115 | client.SendTaskInventory(m_part.UUID, 0, new byte[0]); |
1102 | Util.StringToBytes256(m_inventoryFileName)); | ||
1103 | } | 1116 | } |
1104 | 1117 | ||
1105 | /// <summary> | 1118 | /// <summary> |