• src/syncterm/telnets.c

    From Deucе@1:103/705 to Git commit to main/sbbs/master on Monday, December 30, 2024 14:52:14
    https://gitlab.synchro.net/main/sbbs/-/commit/42fd98a1e2e79ae91dc0e3fa
    Modified Files:
    src/syncterm/telnets.c
    Log Message:
    Set telnets_active to false on error, not true.

    This way, when an error occurs, it will at least terminate the
    session instead of requiring you to disconnect yourself.

    This partially addresses issue 174, assuming it's actually telnets.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Tuesday, December 31, 2024 01:46:20
    https://gitlab.synchro.net/main/sbbs/-/commit/f46582b9adaf2d303a591c17
    Modified Files:
    src/syncterm/telnets.c
    Log Message:
    Use an atomic_bool instead of a mutext for telnets_active

    This doesn't rely on implementation-defined behaviour. I would like
    to use call_once(), but I also want to be consistent with all the
    other code, so use pthread_once() for now.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Tuesday, December 31, 2024 01:59:18
    https://gitlab.synchro.net/main/sbbs/-/commit/678250a01a25df1bafea0f5b
    Modified Files:
    src/syncterm/telnets.c
    Log Message:
    Hrm, be more paranoid aboit __STDC_NO_ATOMICS__ I guess?
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Tuesday, December 31, 2024 02:09:38
    https://gitlab.synchro.net/main/sbbs/-/commit/5001a4ec263bcfc89dabe647
    Modified Files:
    src/syncterm/telnets.c
    Log Message:
    Apparently, just being defined is enough.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Tuesday, December 31, 2024 02:42:03
    https://gitlab.synchro.net/main/sbbs/-/commit/bb2c3ece7860d6d3e68e10c7
    Modified Files:
    src/syncterm/telnets.c
    Log Message:
    Whoops, close that #ifdef
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Tuesday, December 31, 2024 10:32:19
    https://gitlab.synchro.net/main/sbbs/-/commit/4966f43090eb13aa746bb9f1
    Modified Files:
    src/syncterm/telnets.c
    Log Message:
    C17 deprecated ATOMIC_INIT_VAR() so we can use regular initialization

    Since even Microsoft (experimentally) claims to support C17 atomics
    correctly, don't bother with the extra verbosity of using explicit
    atomic "stuff" and just use assigment/access as normal.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Friday, January 17, 2025 07:25:15
    https://gitlab.synchro.net/main/sbbs/-/commit/ad3236e3205dc25b9c3e3631
    Modified Files:
    src/syncterm/telnets.c
    Log Message:
    Set initial telnet modes in telnets

    Not sure how I missed this one.
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sunday, March 15, 2026 01:06:05
    https://gitlab.synchro.net/main/sbbs/-/commit/94c6ca35bbbfa4e4051b6e29
    Modified Files:
    src/syncterm/telnets.c
    Log Message:
    Add missing NULL checks on malloc() in telnets_connect()

    Same issue as ssh.c: conn_api.rd_buf and conn_api.wr_buf were
    allocated without NULL checks. The I/O threads would dereference
    NULL and crash on allocation failure.

    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Sunday, March 15, 2026 14:09:13
    https://gitlab.synchro.net/main/sbbs/-/commit/b97d08c93795dc03cc1f2ac7
    Modified Files:
    src/syncterm/telnets.c
    Log Message:
    Fix infinite loop and missing error checks in telnets.c

    - Input thread: change drain loop condition from "buffered < rd" to
    "bufsz > 0", and add !conn_api.terminate guard. The old condition
    compared against the last read size instead of remaining data,
    causing an infinite loop once bufsz drained to zero.
    - Add missing NULL checks on create_conn_buf() return values in
    telnets_connect(), matching all other connection providers.

    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)