• src/ssh/TODO.md ssh-conn.c src/ssh/test/dssh_test_internal.h test_conn

    From Deuc¿@VERT to Git commit to main/sbbs/master on Fri Mar 27 07:09:30 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/8533cb551b49b8a61d338cf0
    Modified Files:
    src/ssh/TODO.md ssh-conn.c src/ssh/test/dssh_test_internal.h test_conn.c
    Log Message:
    Fix 3 window-accounting data races (items 51, 63, 84)

    local_window was modified without buf_mtx and before send_packet
    succeeded, causing flow-control drift and permanent channel stalls. session_write/write_ext used a stale remote_window snapshot from a
    separate lock acquisition, causing spurious DSSH_ERROR_TOOLONG.

    - send_window_adjust: update local_window under buf_mtx, only after
    send_packet succeeds
    - send_data/send_extended_data: add size_t *sentp parameter for
    clamp-under-lock mode (NULL = exact-or-fail)
    - session_write/write_ext: pass bufsz directly, let inner function
    clamp atomically (eliminates double-lock gap)
    - channel_write: remove racy unlocked pre-check of remote_window

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sat Mar 28 12:55:04 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/4d27ca8b6489c631c6fc2070
    Modified Files:
    src/ssh/TODO.md ssh-conn.c src/ssh/test/dssh_test_internal.h test_conn.c
    Log Message:
    Close items 26, 30: decompose demux_dispatch/accept_channel, eliminate SER macros

    demux_dispatch() (~240 lines) split into 4 helpers:
    handle_channel_data, handle_channel_extended_data,
    handle_channel_request, and dssh_test_parse_channel_request
    (DSSH_TESTABLE shared parser). Switch body reduced to ~15 lines.

    dssh_session_accept_channel() (~230 lines) split into
    accept_channel_init and accept_setup_loop, both using
    the shared CHANNEL_REQUEST parser. Main function reduced
    to ~50 lines.

    PTY_SER/SIG_SER local macros replaced with direct DSSH_PUT_U32
    calls (11 sites). 6 new parser unit tests.

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net