Dive Site Duplicates [was Re: Dive site management on daily build 4.4.2.669]
Dirk Hohndel
dirk at hohndel.org
Wed Jun 17 06:34:02 PDT 2015
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.
/D
More information about the subsurface
mailing list