• src/syncterm/telnet_io.c

    From Deucе@VERT to Git commit to main/sbbs/master on Thu Apr 3 05:20:12 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/9a9a81ea0a4c6a5666ca5ae0
    Modified Files:
    src/syncterm/telnet_io.c
    Log Message:
    Fix telnet binary mode tracking.

    When SyncTERM started by enabling binary mode in both directions,
    the internal tracking of the binary status wasn't updated, so it
    was incorrectly tracked as being in NVT mode. After a file
    transfer, it would then revert to the NVT mode it throught it was
    in.

    This change updates the binary mode value when sending as well as
    receiving TELNET_BINARY_TX.

    This is still technically broken though since binary mode is
    negotiated separately in each direction, and the initial send of
    WILL + DO is actually a pair of requests that need to be confirmed
    by the remote. Until they are confirmed, the connection is still
    in NVT mode.

    Hopefully though this isn't an issue since the remote should reply
    to both, and if it denies there's no effective difference between
    what we should do when already in binary mode and not because we
    don't support any other modes (such as CHARSET option). Fixing it
    correctly would get very complex and involve blocking the connection
    until we get a response.

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