Skip to content
Snippets Groups Projects
  1. Jun 26, 2023
    • Rob Swindell's avatar
      Eliminate STRERROR macro · 4a53863e
      Rob Swindell authored
      This macro hasn't done anything meaningful since we stopped using really old
      versions of Borland compilers (and std libraries) where strerror() returned a
      string terminated with a line-feed (\n) character.
      4a53863e
    • Rob Swindell's avatar
      Thread-safe wrappers for std/socket errno description getters for sbbs_t · ad6c078c
      Rob Swindell authored
      These should only be used in the sbbs_t methods called by node_thread or
      event_thread. Any other thread-shared sbbs_t instances should not use these
      methods since they share a single error description string buffer.
      ad6c078c
    • Rob Swindell's avatar
      Fix type 2.2 packet header generation · 30f7d76f
      Rob Swindell authored
      As reported by Deon on DOVE-Net: type 2.2 packet generation was not (since
      SBBSecho v3.0) setting the origin and destination point values correctly:
      was leaving the packet type 2.0 date values in these fields.
      
      Also, zero-out the reserved bytes in the type 2.2 packet header (don't leave
      the type 2.0 date values in there).
      
      Thanks for the report Deon!
      30f7d76f
  2. Jun 24, 2023
  3. Jun 18, 2023
  4. Jun 17, 2023
  5. Jun 16, 2023
  6. Jun 15, 2023
  7. Jun 13, 2023
  8. Jun 12, 2023
  9. Jun 11, 2023
  10. Jun 10, 2023
  11. Jun 09, 2023
    • Rob Swindell's avatar
      Address new GCC (10.2) warnings from previous commit · ee5559e9
      Rob Swindell authored
      Adding and removing typecasts and changing some types (of ints).
      ee5559e9
    • Rob Swindell's avatar
      <Deuce> ... billion-and-one result of comparison of constant 100000 warnings. · 2b087b8b
      Rob Swindell authored
      So Clang-FreeBSD was warning (in compiles of scfg/scfg*.c by Deuce):
      result of comparison of constant 100000 with expression of type 'uint16_t'
      (aka 'unsigned short') is always true
      
      Why? Cause a uint16_t's max value is 65535 (less than 100000). Sure we could
      have just lowered the UIFC max number of config items to 65535, but that would
      have been too easy. And why are these compared-with values of type uint16_t to
      begin with? Because most ctrl/*.cnf lists (of configuration items) were
      limited to 65535 entries cause ... 16-bit DOS, historically. Now that *.cnf
      files aren't used, we could just increase these scfg_t.*_total type sizes from
      16 to 32-bits, yeah? The result is this commit.
      
      I went to (signed) int so we could still keep -1 as the special illegal
      sub/dir num value (e.g. INVALID_SUB, which is sometimes used to indicate the
      email message base). Theoretically, 2 billion configuration items could be
      supported in these lists, but SCFG will limit you to 100000 anyway. So there's
      a whole lot of s/uint/int in this commit.
      
      I'd be very surprised if this doesn't result in some new GCC/Clang warnings,
      but at least the old "comparison of constant 100000" warnings are now gone!
      2b087b8b
  12. Jun 07, 2023
  13. Jun 06, 2023
  14. Jun 05, 2023
  15. Jun 04, 2023
  16. Jun 03, 2023
    • Rob Swindell's avatar
      Use "Message Editors" instead of the (vague) "External Editors" · 81548689
      Rob Swindell authored
      It was redudnant having "External Editors" under "External Programs" (they're
      all external, yeah?) and of course, "Editors of what?"
      
      So yeah, existing docs are now all wrong. :-)
      81548689
    • Rob Swindell's avatar
      Add a 60-second timeout to sbbs_t::passthru_socket_activate() · 0766f913
      Rob Swindell authored
      Keyop reported an issue via irc whereby a user that failed to download a file
      would leave the node "hung" in "downloading via telnet" node status even
      though the user had long since disconnected and the log reflected that the
      terminal server was aware of this:
      
      term Node 4 <user> sexyz: !1152 zmodem_recv_raw TIMEOUT (10 seconds)
      term Node 4 <user> sexyz: !zmodem_recv_header TIMEOUT
      term Node 4 <user> external Timeout waiting for output buffer to empty
      <minutes later>
      term Node 4 connection reset by peer on send
      term Node 4 !ERROR 32 sending on socket 102
      term Node 4 !ERROR 32 sending on socket 102
      term Node 4 !ERROR 32 sending on socket 102
      term Node 4 !ERROR 32 sending on socket 102
      term Node 4 !ERROR 32 sending on socket 102
      term Node 4 disconnected
      term Node 4 !ERROR 32 sending on socket 102
      
      and
      
      term Node 3 <user> sexyz: !1152 zmodem_recv_raw TIMEOUT (10 seconds)
      term Node 3 <user> sexyz: !zmodem_recv_header TIMEOUT
      term Node 3 <user> sexyz: !Receive timeout (1 seconds)
      term Node 3 <user> sexyz: !Receive timeout (1 seconds)
      term Node 3 <user> sexyz: !Receive timeout (1 seconds)
      term Node 3 <user> sexyz: !Receive timeout (1 seconds)
      term Node 3 <user> sexyz: !Receive timeout (1 seconds)
      term Node 3 <user> sexyz: !Receive timeout (1 seconds)
      term Node 3 <user> sexyz: !Receive timeout (1 seconds)
      term Node 3 <user> sexyz: !Receive timeout (1 seconds)
      term Node 3 <user> sexyz: !Receive timeout (1 seconds)
      term Node 3 <user> sexyz: !Receive timeout (1 seconds)
      term Node 3 <user> sexyz: !1152 zmodem_recv_raw TIMEOUT (10 seconds)
      term Node 3 <user> sexyz: !zmodem_recv_header TIMEOUT
      term Node 3 <user> external Timeout waiting for output buffer to empty
      <minutes later>
      term Node 3 connection reset by peer on receive
      term Node 3 !ERROR 32 sending on socket 96
      
      These nodes were then locked up in call to passthru_socket_activate(false)
      as reported by gdb, e.g.
      
      Looking at passthru_socket_activate(), the deactivation path (called at the
      end of external() in this case), it was clear that this could be an infinite
      loop in the case the user had disconnected:
      
          do { // Allow time for the passthru_thread to move any pending socket data to the outbuf
              SLEEP(100); // Before the node_thread starts sending its own data to the outbuf
          } while(RingBufFull(&outbuf));
      
      These flush/purge loops aren't strictly needed if the user has disconnected,
      but as can be seen by the above logs, the terminal server may not know that
      (the socket may not indicate disconnect) before passthru_socket_activate()
      is called by external().
      
      So... worst case, just do the activation and deactivation buffer flushes
      and purges for 60 seconds.
      0766f913
  17. Jun 01, 2023
Loading