From af89698d6424f5996c88bde6407dee4df2dc7bc5 Mon Sep 17 00:00:00 2001 From: Oliver Schwaneberg Date: Fri, 19 Jan 2018 06:18:36 +0100 Subject: Checking for ACK for getDive. get_matching_dive does not check if the DC wrote an acknowledgement for the requested dive. As result, the sync stalls if dive number 0 is not available. Signed-off-by: Oliver Schwaneberg --- core/uemis-downloader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/uemis-downloader.c b/core/uemis-downloader.c index b327f29e8..1587f9f5f 100644 --- a/core/uemis-downloader.c +++ b/core/uemis-downloader.c @@ -1210,7 +1210,7 @@ static bool get_matching_dive(int idx, char *newmax, int *uemis_mem_status, devi } else { uint32_t nr_found = 0; char *logfilenr = strstr(mbuf, "logfilenr"); - if (logfilenr) { + if (logfilenr && strstr(mbuf, "act{")) { sscanf(logfilenr, "logfilenr{int{%u", &nr_found); if (nr_found >= dive->dc.diveid || nr_found == 0) { found_above = true; -- cgit v1.2.3-70-g09d2