MantisBT - opensim
View Issue Details
0006772opensim[REGION] OpenSim Corepublic2013-09-18 07:082014-07-29 13:42
master (dev code) 
master (dev code) 
Grid (1 Region per Sim)
Mono / Linux32
0006772: [PATCH] When giving an item to an avatar on a different simulator, two copies are given
When avatar A gives an item to avatar B, and the avatars are on different simulators, avatar B gets two copies of the item.

This isn't immediately obvious because the viewer will only show one item at first. After restarting the viewer both items will be visible.
1. Place two avatars in two different simulators.
2. Have one avatar give an item to the other avatar, and the second avatar accepts it.
3. Have the second avatar restart his viewer. His inventory will now show two copies of the item.
Here's why this happens: when a user gives an item, the user's client sends an InventoryOffered IM message to its simulator. This adds the item to the receiver's inventory immediately (using the Inventory Service). If the receiver isn't in the same simulator then XMLRPC is used to forward the IM to the correct simulator. The bug was that the receiving simulator handled the message by calling OnInstantMessage() again, which added a second copy of the item to the inventory. Instead, the receiving simulator should only notify the avatar that the item was offered.
No tags attached.
patch 0001-When-giving-items-between-avatars-in-different-simul.patch (4,821) 2013-09-18 07:08
patch 0001-Allow-Boolean-nodes-in-XML-to-be-specified-as-0-1-.-.patch (2,081) 2013-09-18 07:08
Issue History
2013-09-18 07:08orenhNew Issue
2013-09-18 07:08orenhStatusnew => assigned
2013-09-18 07:08orenhAssigned To => justincc
2013-09-18 07:08orenhFile Added: 0001-When-giving-items-between-avatars-in-different-simul.patch
2013-09-18 07:08orenhFile Added: 0001-Allow-Boolean-nodes-in-XML-to-be-specified-as-0-1-.-.patch
2013-09-18 07:08orenhStatusassigned => patch included
2013-09-18 07:13orenhNote Added: 0024358
2013-09-20 16:45justinccNote Added: 0024376
2014-01-07 01:42orenhNote Added: 0024949
2014-01-11 23:44orenhStatuspatch included => resolved
2014-01-11 23:44orenhResolutionopen => fixed
2014-07-29 13:42chi11kenStatusresolved => closed

2013-09-18 07:13   
I also included a small patch to make the XML parser more forgiving. This isn't related to the inventory; I just stuck it here to avoid creating a whole new Mantis entry for such a small fix.
2013-09-20 16:45   
Thanks orenh, bug confirmed and patch applied as git master cbdfe96. Run out of time to look at other patches tonight.
2014-01-07 01:42   
Please apply the second patch in this Mantis entry ("Allow Boolean nodes in XML to be specified as "0/1"."). It's minor, but lets OpenSim work better with content that was brought in from AuroraSim.