Skip to content

Fix OSD to InventoryItem parsing - #167

Merged
cinderblocks merged 2 commits into
cinderblocks:masterfrom
secondlife:mercury/fix_osd_test
Aug 7, 2026
Merged

Fix OSD to InventoryItem parsing#167
cinderblocks merged 2 commits into
cinderblocks:masterfrom
secondlife:mercury/fix_osd_test

Conversation

@mercurylinden

Copy link
Copy Markdown
Contributor

Issue:

I noticed that my call to UpdateTaskInventory() was no longer updating the item in an object's inventory. I am finding the InventoryItem with GetTaskInventoryAsync(), modifying it and then passing it back to UpdateTaskInventory().

The issue is that GetTaskInventoryAsync() was changed to first try and use GetTaskInventoryViaCapAsync(), which relies on InventoryItem FromOSD() to parse the deserialized llsd from the RequestTaskInventory cap. InventoryItem FromOSD() is incorrectly parsing the OSDMap that is created in GetTaskInventoryViaCapAsync():

  • ownerID is not getting parsed at all
  • invType and assetType are being read as ints, but are strings in the OSDMap

So the wrong item data is getting sent to the simulator though UpdateTaskInventory(), and the simulator cannot update the item.

Verifications

  • project builds
  • all tests passing
  • GetTaskInventoryAsync() provides a correct InventoryItem list.

@cinderblocks
cinderblocks merged commit 2aa70bb into cinderblocks:master Aug 7, 2026
11 of 12 checks passed
@cinderblocks

Copy link
Copy Markdown
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants