summaryrefslogtreecommitdiffstats
path: root/uemis-downloader.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-18 12:37:23 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-18 13:16:57 -0700
commit07a2514d9f1910ed96316c7c46956c846f6a6d7d (patch)
tree193eff24b74fb7c146139f685ef6df9a19f49753 /uemis-downloader.c
parentf7eb6f6b588cc83197705ad14bf4ab7eedc8ee06 (diff)
downloadsubsurface-07a2514d9f1910ed96316c7c46956c846f6a6d7d.tar.gz
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>
Diffstat (limited to 'uemis-downloader.c')
-rw-r--r--uemis-downloader.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/uemis-downloader.c b/uemis-downloader.c
index b693421b9..422185393 100644
--- a/uemis-downloader.c
+++ b/uemis-downloader.c
@@ -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);
#endif
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 {
/* in this case we found a deleted file, so let's increment */