• src/syncterm/conn.h conn_telnet.c rlogin.c rlogin.h

    From Deucе@VERT to Git commit to main/sbbs/master on Thu Apr 23 18:36:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/af5bb19de5b53360d1f357c0
    Modified Files:
    src/syncterm/conn.h conn_telnet.c rlogin.c rlogin.h
    Log Message:
    SyncTERM: RLogin raw/cooked mode + scope rlogin hooks to RLOGIN conn types

    Implement the remaining RFC 1282 OOB control bytes: 0x10 (enter raw)
    and 0x20 (return to cooked). Cooked mode (the default) now does local
    TTY flow control — DC3 in user input pauses the recv loop, DC1
    resumes — and neither byte reaches the remote. Raw mode passes both
    through.

    The rlogin protocol has no client-initiated raw request, so server-
    and client-initiated raw share a single flag: conn_api.binary_mode,
    upgraded to _Atomic bool. conn_binary_mode_on() now flips raw mode
    for rlogin, so zmodem/ymodem/xmodem transfers stay transparent to
    DC1/DC3 without the transfer code knowing about rlogin at all. The
    side-effect hook rlogin_binary_mode_on() just clears any pending
    pause; no off-hook needed.

    Also scope the rlogin-specific OOB / DC1/DC3 / SO_OOBINLINE paths to CONN_TYPE_RLOGIN and CONN_TYPE_RLOGIN_REVERSED. rlogin_connect is
    shared with RAW and MBBS_GHOST, and the input/output thread pair is
    shared with telnet_connect too; a new rlogin_active atomic gates all
    rlogin behavior so those other conn types remain transparent pipes.

    The 4 rlogin handshake conn_send()s now run BEFORE tx_parse_cb is
    installed, so a password or username containing 0x11/0x13 is passed
    through verbatim instead of being stripped as XON/XOFF.

    Atomics are explicitly atomic_store()'d at the top of rlogin_connect
    and telnet_connect; memset in conn_connect isn't a valid _Atomic
    init, and stale flag state from a prior session would be a mess.

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

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