gloebit / opensim-moneymodule-gloebit

OpenSim addon module integrating with the Gloebit digital currency service
GNU Lesser General Public License v3.0
8 stars 12 forks source link

Stream Handler Update for os 92 dev master #89

Closed BillBlight closed 4 years ago

BillBlight commented 4 years ago

The Gloebit land buy function was making incorrect calls to function with current master code ..

HTTP stream handlers were not being added ..

With Ubit's help, created a fix that should be considered a WIP

Tampa commented 4 years ago

Removing the pre 9.2 is probably not the best approach as backwards compatibility will suffer, ideally need a switch to change methods depending on the version, but with this being a change on master not yet assigned to a release this might be harder. Might have to probe the httpserver directly to test for capabilities before selecting which method to use or something like that.

There is some code that directly references the versioninfo, but this being fairly easily edited or changed by those rebranding OpenSim it may be best to adopt an approach that tests capabilities in general before deciding which methods to use.

There is some other areas that need a bit of refactoring as well to make them more solid for the future so I suppose it is now a good time to give it all a stern looking at in prep for the next OpenSim release and changes to dependencies as well.

BillBlight commented 4 years ago

Since Gloebit already provides a compile for the varying major versions, and "Prior versions" should never need to be compiled again except for bugfix, moving prior versions to a branch would be a good approach ..

Tampa commented 4 years ago

If you read the code there are checks already in place to check the versionnumber for its parts to determine which code should be used to handle certain flows, GloebitMoneyModule.cs line 670 for example. It simply checks the versionnumber instead of testing capabilities it relies on, which would be a more solid approach to determine what flows to use, since anyone can change the version string which would result in the module potentially using the wrong flows.

I guess moving to branches for this would make sense, but I suspect the idea to check this in code is to only have to maintain one branch for all versions so that anyone wishing to compile with the module, rather than using the binary dll, can do so without having to figure out which branch they need. I don't know why anyone would compile older releases themselves, but perhaps if they want to also put in other modules that only work on older OpenSim versions, who knows.

colosi commented 4 years ago

Yes, keeping multiple branches up to date requires additional work. I'd prefer not to start down that path if we can avoid it. I think the best short term solution might be to use the version number which we have done in the past and to research how to check to see if the capabilities exist and migrate to that solution in the future.

colosi commented 4 years ago

Huge thanks to @BillBlight and Ubit on this one. @Tampa and I worked this into PR87 - https://github.com/gloebit/opensim-moneymodule-gloebit/pull/87. Closing this out as it's now in Master.