Uemis downloader: don't try to download divespots that weren't set
This should cut down on redundant calls to download divespot #0. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
@@ -1127,7 +1127,8 @@ static bool get_matching_dive(int idx, char *newmax, int *uemis_mem_status, stru
|
|||||||
fprintf(debugfile, "Matching divelog id %d from %s with dive details %d\n", dive->dc.diveid, d_time, dive_to_read);
|
fprintf(debugfile, "Matching divelog id %d from %s with dive details %d\n", dive->dc.diveid, d_time, dive_to_read);
|
||||||
#endif
|
#endif
|
||||||
int divespot_id = uemis_get_divespot_id_by_diveid(dive->dc.diveid);
|
int divespot_id = uemis_get_divespot_id_by_diveid(dive->dc.diveid);
|
||||||
get_uemis_divespot(mountpath, divespot_id, dive);
|
if (divespot_id >= 0)
|
||||||
|
get_uemis_divespot(mountpath, divespot_id, dive);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* in this case we found a deleted file, so let's increment */
|
/* in this case we found a deleted file, so let's increment */
|
||||||
|
|||||||
2
uemis.c
2
uemis.c
@@ -162,7 +162,7 @@ int uemis_get_divespot_id_by_diveid(uint32_t diveid)
|
|||||||
return hp->divespot;
|
return hp->divespot;
|
||||||
hp = hp->next;
|
hp = hp->next;
|
||||||
}
|
}
|
||||||
return 0;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void uemis_set_divelocation(int divespot, char *text, double longitude, double latitude)
|
void uemis_set_divelocation(int divespot, char *text, double longitude, double latitude)
|
||||||
|
|||||||
Reference in New Issue
Block a user