Bug: --delete manifest sending ignores send_status / send_int / send_str failures #163

Closed
opened 2026-07-29 18:35:47 +02:00 by TapTap · 0 comments
Owner

Description

When --delete is enabled, both send_files() and send_chunks_multithreaded() send the manifest by calling send_status(), send_int(), and send_str() but do not check their return values. If the connection fails mid-manifest, the sender continues and then sends STATUS_FINISHED, desynchronizing the protocol and potentially leaving the receiver in a bad state.

Location

  • src/client/client_send.c:221-225 (multithreaded sender)
  • src/client/client_send.c:408-412 (single-threaded sender)

Suggested fix

  1. Check every send_status()/send_int()/send_str() return in the manifest block.
  2. If any send fails, disconnect and return an error.
  3. Extract the manifest-send block into a helper that returns bool.

Severity

Medium

Category

bug


This issue was automatically generated by the issue-creator agent.

## Description When `--delete` is enabled, both `send_files()` and `send_chunks_multithreaded()` send the manifest by calling `send_status()`, `send_int()`, and `send_str()` but do not check their return values. If the connection fails mid-manifest, the sender continues and then sends `STATUS_FINISHED`, desynchronizing the protocol and potentially leaving the receiver in a bad state. ## Location - `src/client/client_send.c:221-225` (multithreaded sender) - `src/client/client_send.c:408-412` (single-threaded sender) ## Suggested fix 1. Check every `send_status()`/`send_int()`/`send_str()` return in the manifest block. 2. If any send fails, disconnect and return an error. 3. Extract the manifest-send block into a helper that returns `bool`. ## Severity Medium ## Category bug --- _This issue was automatically generated by the issue-creator agent._
TapTap added the bugneeds-triage labels 2026-07-29 18:35:47 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TapTap/FastSync#163