If these links are not deleted, then they will build up in the player's inventory until they can no longer log in.
Accidental deletion of links due to bugs or other causes is potentially inconvenient but on a par with items being
accidentally moved. When a link is deleted, the target of the link is never touched.
This is a general solution that accounts for the use of links anywhere in the user's inventory.
If these links are not deleted, then they will build up in the player's inventory until they can no longer log in.
Accidental deletion of links due to bugs or other causes is potentially inconvenient but on a par with items being
accidentally moved. When a link is deleted, the target of the link is never touched.
This is a general solution that accounts for the use of links anywhere in the user's inventory.
To get this to work, I had to disable the dupe link check I put in a couple of commits ago.
When the viewer adds wearables to an existing outfit, it first requests deletes of all the existing links before creating a new set.
Since these messages are async, the creates were being received before the deletes had a chance to complete, resulting in missing current outfit links.
However, the dupe check shouldn't be as important now that broken links have been fixed - it was the broken links that were causing the client to create dupes.
Tested on kokua 0.1.0 WIP and SL 2.6.3. I now have no problems managing outfits on my standalone.
It appears that if the viewer requests a folder containing links, we must also send the folders that contain the link targets first.
This was tested with Kokua 0.1.0 WIP though I predict it will also work with other viewer 2s
I believe this is safe since there is a 1-1 correspondence between link item and worn item (i.e. you can't be wearing the same item at two spots simultaneously in one outfit).
This should stop lots of duplicate links being created when viewer 2 is used.
However, this doesn't prevent broken inventory links, which I believe is timing related since the effect is not consistent (e.g. keep relogging and the viewer should end up seeing them correctly) . I think we actually see this problem on viewer 1 as well.
It might be easier just to implement the Fetch*2 inventory caps which are documented at http://wiki.secondlife.com/wiki/Inventory_API. WebFetch* has been deprecated by Linden Lab since viewer 2.5.1 and according to the sl wiki, "has numerous bugs".