diff --git a/src/divesystem_idive.c b/src/divesystem_idive.c index 1da536d..f0c31dc 100644 --- a/src/divesystem_idive.c +++ b/src/divesystem_idive.c @@ -437,8 +437,13 @@ divesystem_idive_device_foreach (dc_device_t *abstract, dc_dive_callback_t callb unsigned char cmd_range[] = {commands->range.cmd, 0x8D}; rc = divesystem_idive_transfer (device, cmd_range, sizeof(cmd_range), packet, commands->range.size, &errcode); - if (rc != DC_STATUS_SUCCESS) - return rc; + if (rc != DC_STATUS_SUCCESS) { + if (errcode == ERR_UNAVAILABLE) { + return DC_STATUS_SUCCESS; // No dives found. + } else { + return rc; + } + } // Get the range of the available dive numbers. unsigned int first = array_uint16_le (packet + 0);