Repository navigation
Conversation
The summary was best effort, so the same dive could download with or without it depending on a transfer error. Fail the download instead, so a dive always includes its summary. The size check then always compares against the full listed size.
A stream that stops before its end marker, and a dive whose size still doesn't match the listing after the retry, now fail instead of returning possibly truncated data. A stream that stops early is retried like one with a missing chunk. Release and unsubscribe errors, including a non-200 reply status, are returned to the caller. A packet for another request is skipped with a generic warning. Merge the GET into suunto_nautic_get_handle, check the path for NULL, allow a NULL actual length, and preallocate the compressed buffer to the listed size.
Append the fixed size records of each /Logbook/Entries page to a byte buffer, and process them in reverse order, since the watch lists them oldest first. This replaces the id and size arrays and the sort.
The driver releases every handle it binds, and always uses the handle the GET returns, so a GET that answers with the 10 slot needs no special treatment. The slot can also be bound by another app on the same link, which must not be released. Reword the reason for the sequence number start, which came from the same theory.
A stream chunk at any offset other than the data received so far is an error: apart from the end marker, which is sent twice, the watch never repeats a chunk. Request the first /Logbook/Entries page through the same code path, with an empty parameter list. Require the 14-byte header of an empty page, and explain the checks that stop a paged read from repeating the same request. Name what is known of the reply, notification and logbook entry layouts.
…is gone suunto_nautic_device_download looks up the listed size first. When that listing times out or the link is gone, return the error instead of going on to download without the size check, which only adds the stream retries before failing the same way.
latishab
added a commit
to deepsealabs/libdc-swift
that referenced
this pull request
Oct 23, 2026
A dive whose stream never reaches its end marker now times out instead of coming back short, which Auto download treated as a lost link and reconnected for indefinitely, never reaching the newer dives. Once the dive's retries are used up it is reported as failed and the next session moves on. Point libdivecomputer at deepsealabs/libdivecomputer#17's 5b97bee (a by-id download returns its listing's transport error). New tests pin the foreign-notification filter (#15), an empty logbook's 14-byte page, an unknown path's DC_STATUS_UNSUPPORTED, and the retry counts of the stream checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports this round of the libdivecomputer#73 review (Jef's Oct 22 comments) to the fork, on top of #15:
Extension API changes that come with it:
suunto_nautic_device_downloadno longer returns DC_STATUS_DATAFORMAT with a partial dive on a size mismatch; it fails with the driver's error and an empty buffer, like any other failuresuunto_nautic_device_subscriberesolves its path with its own GET helper, so an unknown path still returns DC_STATUS_UNSUPPORTEDsuunto_nautic_device_list/_downloadread the new record bufferNot tested on hardware yet; goes out as DC Tester build 23 first.
🤖 Generated with Claude Code