• src/ssh/TODO.md ssh-conn.c ssh.c

    From Deucе@VERT to Git commit to main/sbbs/master on Fri Mar 27 05:30:23 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/7519a938abcf7c6869b1342b
    Modified Files:
    src/ssh/TODO.md ssh-conn.c ssh.c
    Log Message:
    Fix 3 bugs: data race, memory leak, terminate hang

    - dssh_session_write/write_ext: read remote_window and remote_max_packet
    under buf_mtx to eliminate data race with demux WINDOW_ADJUST thread
    - dssh_session_accept_channel fail path: free setup_payload before
    freeing channel struct to prevent leak when demux delivered a message
    - dssh_session_set_terminate and demux cleanup: remove chan_type != 0
    guard so setup-mode channels get poll_cnd signaled on termination
    (buf_mtx/poll_cnd are initialized before register_channel)

    Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

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