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 <oliver.schwaneberg@gmail.com>
This commit is contained in:
Oliver Schwaneberg 2018-01-19 06:18:36 +01:00 committed by Dirk Hohndel
parent 65caddb294
commit af89698d64

View file

@ -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;