OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
/// <summary>
/// Serialize all the metadata for the items in this prim's inventory ready for sending to the client
/// </summary>
/// <param name="xferManager"></param>
Serialize all the metadata for the items in this prim's inventory ready for sending to the client
Serialize all the metadata for the items in this prim ' s inventory ready for sending to the client
public void RequestInventoryFile(IClientAPI client, IXfer xferManager)
        {
            lock (m_items)
            {
                if (m_items.Count == 0) 
                {
                    client.SendTaskInventory(m_part.UUID, 0, new byte[0]);
                    return;
                }
                CreateInventoryFile();
                if (m_inventoryFileData.Length > 2)
                {
                    xferManager.AddNewFile(m_inventoryFileName, m_inventoryFileData);
                }
                client.SendTaskInventory(m_part.UUID, (short)m_inventorySerial,
                        Util.StringToBytes256(m_inventoryFileName));
            }
        }
public void RequestInventoryFile ( IClientAPI client , IXfer xferManager ) { lock ( m_items ) { if ( m_items . Count == 0 ) { client . SendTaskInventory ( m_part . UUID , 0 , new byte [ 0 ] ) ; return ; } CreateInventoryFile ( ) ; if ( m_inventoryFileData . Length > 2 ) { xferManager . AddNewFile ( m_inventoryFileName , m_inventoryFileData ) ; } client . SendTaskInventory ( m_part . UUID , ( short ) m_inventorySerial , Util . StringToBytes256 ( m_inventoryFileName ) ) ; } }
Serialize all the metadata for the items in this prim's inventory ready for sending to the client
Serialize all the metadata for the items in this prim ' s inventory ready for sending to the client
// Don't send a inventory xfer name if there are no items.  Doing so causes viewer 3 to crash when rezzing // a new script if any previous deletion has left the prim inventory empty. // No inventory //                    m_log.DebugFormat( //                        "[PRIM INVENTORY]: Not sending inventory data for part {0} {1} {2} for {3} since no items", //                        m_part.Name, m_part.LocalId, m_part.UUID, client.Name); // In principle, we should only do the rest if the inventory changed; // by sending m_inventorySerial to the client, it ought to know // that nothing changed and that it doesn't need to request the file.  // Unfortunately, it doesn't look like the client optimizes this;  // the client seems to always come back and request the Xfer,  // no matter what value m_inventorySerial has. // FIXME: Could probably be > 0 here rather than > 2 // Add the file for Xfer //                m_log.DebugFormat( //                    "[PRIM INVENTORY]: Adding inventory file {0} (length {1}) for transfer on {2} {3} {4}", //                    m_inventoryFileName, m_inventoryFileData.Length, m_part.Name, m_part.UUID, m_part.LocalId); // Tell the client we're ready to Xfer the file
client
IClientAPI
xferManager
IXfer
None