[Opensim-dev] Folder numbers

Oren Hurvitz orenh at kitely.com
Thu Aug 6 14:51:34 UTC 2015


+1 to changing the root folder type to 8.

Regarding the Suitcase Folder: in the database, the Folder Type is 100.
This unique value is used to find the suitcase folder. However, viewers
don't understand this type, so when we send the folder to them we pretend
that its type is 8. These constants are defined at the top
of InventoryItemBase.cs. IIRC you (Diva) had defined this constant, and the
commit I had made was just to make sure it's used in *every* place where we
talk to the viewer, as some places were sending folder type 8 and some were
sending folder type -1.

If the viewer devs add support for Folder Type 100 then we could remove the
hack that sends a fake type for the suitcase. However, this would have to
be delayed until we can be sure that most of the OpenSim users have
upgraded to viewers that support this.

I believe using folder type -1 for the Suitcase caused problems, which is
why I took the time to make sure we never send it. IIRC there were two
problems, both of which are caused by the fact that folder type -1 is
normally used for user-created folders, but we want the Suitcase folder to
behave like a system folder (like the folders "Objects", "Textures", etc.)

The first problem is that the Suitcase folder becomes deletable if its type
is -1. I don't remember what happens if you try to delete it and the server
refuses: it may be that the folder appears deleted in the viewer but
reappears later. But that still "astonishes the user". The second problem
is that the folder gets dumped with the rest of the user-created folders
(in the sort order), where it may not be easily visible. Currently, when it
has a System Folder Type (anything other than -1), it gets sorted with the
system folders.

So the best approach is this: first, we'll switch the folder types: send
the Root Folder as 8, and the Suitcase as 9. Once the viewer devs have
added support for Folder Type 100, and enough time has passed that most
users have such viewers, we'll change the folder type of the Suitcase to
100, and the viewer devs will remove the hacks that they currently use for
OpenSim.

Oren



On Thu, Aug 6, 2015 at 5:16 PM, Diva Canto <diva at metaverseink.com> wrote:

> The devs of the Alchemy viewer reached out to us pointing out that the
> number OpenSim has been using for the root folders (9) is inconsistent with
> what viewers expect (8). The enum that rules this is here:
>
> https://bitbucket.org/lindenlab/viewer-release/src/9f2f82e7c37127106b340b18c3a938f1ecf121cf/indra/llinventory/llfoldertype.h?at=default
>
> So far, it appears that viewer devs have simply been working around the
> problem in order to support OpenSim -- basically disabling a number of
> consistency checks at login, otherwise the viewers would crash. A root
> folder anything other than 8 will crash viewers that check for it.
>
> The Alchemy devs are now adding support for OpenSim from a clean-slate,
> and ran into this. Instead of proceeding to work around it again, they are
> asking if we can make OpenSim consistent with the protocol.
>
> While changing the code is trivial, this has implications beyond that.
> Specifically, grid operators might need to change the DB in order to change
> all root folders to 8.
>
> Now, it is my understanding that the DB change is not urgent, as the
> popular viewers (Singularity, FireStorm) will continue to disable those
> consistency checks for a while. But Singularity will likely pick up any
> improvements we make that will decrease the number of work-arounds for
> OpenSim. So in the long run, it will be wise for grid operators to make
> that change (it's a trivial UPDATE statement).
>
> Also related to this, the Suitcase folder number that gets sent to the
> viewer is... 8. So we'd need to change that to another number, because
> that's reserved for root folders (in the viewers that check). -1 is the
> default, and it's harmless. But in talking to these viewer devs, they seem
> to be open to introducing a new special folder number for the Suitcase (100
> or 64), so that eventually they may even do special things with it in terms
> of UI.
>
> I would like to hear of any objections to proceeding with (1) complying
> with the protocol for root folders and (2) changing the Suitcase folder
> number to something other than 8 (Oren, you did that, so please let us
> know).
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at opensimulator.org
> http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev
>



-- 
Oren Hurvitz
VP R&D
Kitely Ltd.

Email: orenh at kitely.com <ilan at kitely.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20150806/aa118cd7/attachment.html>


More information about the Opensim-dev mailing list