Dive Site Duplicates [was Re: Dive site management on daily build 4.4.2.669]

Davide DB dbdavide at gmail.com
Wed Jun 17 06:52:44 PDT 2015


On Wed, Jun 17, 2015 at 3:34 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
> On Wed, Jun 17, 2015 at 03:11:45PM +0200, Davide DB wrote:
>>
>> Last question is about the UUID. Did it change across different builds?
>> I understood that it should be created always the same for the same dive site.
>
> Not sure what gave you this impression :-)
>
> Here's the actual code
>
>         while (id == 0 || get_dive_site_by_uuid(id)) {
>                 id = rand() & 0xff;
>                 id |= (rand() & 0xff) << 8;
>                 id |= (rand() & 0xff) << 16;
>                 id |= (rand() & 0xff) << 24;
>         }
>
> So it's a randon number and we make sure it's unique. So yes, if you
> create a dive site during two different runs of Subsurface, you will most
> definitely get different uuids.
>
> We need the ability to manage / merge them.
>
> But just like everyone else here, Tomaz has real life competing for his
> time and attention. And in order for us not to step on each others' toes,
> I am working on other parts of the code (the cloud storage backend).
>
> So this may take a little while to sort itself out.

Of course.
I was just trying to understand the logic behind this.
I thought that a dive site should be unique as the real place it
represent hence the same (V2 format) dive would generate always the
same dive site even across subsurface instances. Basically an hash of
the location data. But there's something I do not get. Anyway, nothing
important.

Thank you



-- 
Davide
https://vimeo.com/bocio/videos


More information about the subsurface mailing list