[Opensim-dev] Partial libSL.Packet fix submitted

Teravus Ovares teravus at gmail.com
Thu Dec 20 13:28:25 UTC 2007


Well, alternatively, you could strip out the hyphens where needed.

ToString.Replace FTW!!!111!!1!1!!11!1!!One


On 12/20/07, Justin Clark-Casey <jjustincc at googlemail.com> wrote:
>
> Johan Berntsson wrote:
> > This problem is not caused by my work, but of changes in later versions
> > of LibSL. It has changed from using ToString (unhyphenated) and
> > ToStringHyphenated(), to only using ToString() (hyphenated). This means
> > that there is no way of getting an unhyphenated string from libSL
> > anymore. I changed all instances of  ToStringHyphenated() in OpenSim to
> > ToString(), but I didn't realize that there would be a problem with
> > plain ToString() calls.
> >
> > The basic problem is that we are relying on a libSL behaviour that is
> > outside our control, and has changed. If we want to keep up to date with
> > libSL I suggest that the problem is solved.
> >
> > Possible solutions:
> > 1. Identify the problematic ToString() calls and use a utility function
> > (Util.ConvertToUnhyphentated) to fix them like before.
> > 2. Write scripts to update the current databases to use hyphenated
> > GUID:s
> > 3. Change the code not to use ToString at all.
> >
> > I prefer option 3, and to be compatible it could output unhyphenated
> > GUIDs. At least this means that we won't have problems every time libSL
> > is refactored (and ToString is meant as a debug tool, not as a provider
> > of keys to a database)
> >
> Is there any chance that, if asked, the LibSL folks would add extra
> methods such as
>
> ToGuidString()
> ToGuidHyphenatedString()
>
> ?  We would still be relying on LibSL but with explicitly named and
> purposed methods such as these rather than ToString(), I would hope
> no-notice refactoring would be much less likely.
>
> If necessary, we could then migrate to our own methods at our leisure
> (after patching all the string calls to use these two methods).
>
> Even if they won't do this, we could patch their code in the meantime
> for these methods (I doubt that would be very complicated) if migrating
> now would be considerable and destablizing work (in light of 0.5).
>
> Regards,
>
> --
> justincc
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20071220/f6efca32/attachment-0001.html>


More information about the Opensim-dev mailing list