https://gitlab.synchro.net/main/sbbs/-/commit/09ea8a69012ea2688447f28b
Modified Files:
src/sbbs3/zmodem.c
Log Message:
zmodem: report the receiver's file position instead of always zero
Nearly every message in zmodem.c is prefixed with the current file offset,
but zm->current_file_pos was assigned in exactly one place,
zmodem_send_from(), so on the receiving side it kept the zero that zmodem_init() memset it to. A download therefore ended with
"0 Finishing Session (Sending ZFIN)" printed directly beneath
"8192 Received: ZEOF" -- the latter reads a local position from ftello(),
which is why only some of the numbers looked wrong.
Assign current_file_pos from that same ftello(), at the start of the file
and after each received subpacket, so the two cannot disagree. With a
download stalled after 236504064 bytes, the receiver's timeout message now names that offset rather than 0.
Drop the prefix from the ZFIN message: it ends a session rather than a
file, and has no offset to report in either direction. On the sending side
it had been printing the last file's final position.
zmodem_ver 2.5 -> 2.6.
Co-Authored-By: Claude Opus 5 (1M context) <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net