• src/sbbs3/sftp.cpp src/sftp/sftp.h sftp_client.c sftp_common.c sftp_se

    From Deucе@VERT to Git commit to main/sbbs/master on Fri Apr 24 14:19:28 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/faf6902e71d543abc2d818b8
    Modified Files:
    src/sbbs3/sftp.cpp src/sftp/sftp.h sftp_client.c sftp_common.c sftp_server.c src/syncterm/sftp_browser.c sftp_queue.c
    Log Message:
    SFTP: sha1s/md5s/descs extensions, hash-verified compare, history drop-on-connect

    Library: two new handshake extensions ([email protected], [email protected]) carry the raw binary digest as a file-attribute extension; a third ([email protected]) is an on-demand SSH_FXP_EXTENDED query that takes a
    path and returns the extdesc string as SSH_FXP_EXTENDED_REPLY. Adds sftpc_descs(), sftps_send_extended_reply(), and sftp_rx_get_string() for
    the server-side extended callback to parse args. Also fixes a missing
    break in the SSH_FXP_EXTENDED dispatch case.

    Server (sbbs3/sftp.cpp): implements the descs handler — walks the path through path_map, smb_findfile + smb_getfile(file_detail_extdesc), sends
    back file.extdesc. Wires sftp_state->extended. Also fixes a dormant
    C++ bug in path_map(const char*, ...) — it tried to delegate by
    instantiating a temporary in the body, which left the real object with
    result_ = MAP_FAILED. Delegation now goes through the member init list.

    SyncTERM browser: when size matches, the local-compare now verifies via
    SHA-1 or MD5 (preferring SHA-1) if the server advertised a hash for the
    file; otherwise falls back to mtime. F2 on a highlighted file queries
    the descs extension and displays the extended description in a
    scrollable popup. Queue history is dropped at connect time — DONE /
    FAILED / CANCELLED rows from the previous session aren't reloaded, so
    each session starts with just its still-pending transfers.

    Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net