This patch will fix the problem I reported in
LIBOMV-391. A summary of the problem is below:
I noticed that when in-world objects are attached to an avatar, the inventory will not show this new attachment when the avatar is logged in using the normal viewer.
I did some spying with GridProxy and the normal LL viewer and I noticed that when a new object is attached, the simulator will send an UpdateCreateInventoryItem packet to the viewer, containing the ItemID of the new attachment in inventory, but it has not assigned a FolderID to the item. The offical LL viewer then assigns the default folder for objects to the item and sends out an UpdateInventoryItem packet to the simulator, in order to update the item with a correct FolderID.
This is not happening in OpenMV. Because of this, when a user attaches an in-world object using Objects.AttachObject, it will create an item in the user's inventory that does not have a correct FolderID/ParentUUID. Therefore, it will not show up in the inventory anymore.
My patch will modify the UpdateCreateInventoryItem handler to check if newly created items in inventory have a FolderID of zero (as far as I know, this only happens when new objects are attached). If a new item has no valid root folder, the default folder will be assigned to the item and the sim is notified of this change.