Dive site: use pointer instead of uuid in uemis_helper

Another small step in removing dive-site UUIDs: use a pointer
instead of a UUID in the "uemis_helper" structure.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-10-24 16:03:52 +02:00 committed by Dirk Hohndel
parent 64f0902e0d
commit d674c5028f
3 changed files with 8 additions and 7 deletions

View file

@ -992,8 +992,9 @@ static bool process_raw_buffer(device_data_t *devdata, uint32_t deviceid, char *
} else if (!is_log && dive && !strcmp(tag, "divespot_id")) {
int divespot_id = atoi(val);
if (divespot_id != -1) {
dive->dive_site_uuid = create_dive_site("from Uemis", dive->when)->uuid;
uemis_mark_divelocation(dive->dc.diveid, divespot_id, dive->dive_site_uuid);
struct dive_site *ds = create_dive_site("from Uemis", dive->when);
dive->dive_site_uuid = ds->uuid;
uemis_mark_divelocation(dive->dc.diveid, divespot_id, ds);
}
#if UEMIS_DEBUG & 2
fprintf(debugfile, "Created divesite %d for diveid : %d\n", dive->dive_site_uuid, dive->dc.diveid);