Skip to content
Snippets Groups Projects
  1. Jun 09, 2023
    • 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
  2. Jun 07, 2023
  3. Jun 06, 2023
  4. Jun 05, 2023
  5. Jun 04, 2023
  6. 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
  7. Jun 01, 2023
  8. May 31, 2023
    • Deucе's avatar
      Use /bin/pwd instead of pwd to get the PWD. · 2ba9dc40
      Deucе authored
      Some shell pwd implementations default to the "Logical" PWD, which
      can contain symlinks.  The POSIX standard for /bin/pwd is to return
      the "Physical" PWD with all symlinks resolved.  Some shells don't
      support the -P option the the built-in pwd, so we don't want to
      reply on that.
      
      For some reason, we're redefining the PWD env variable which should
      by the phyical path, but I'm not really interested in tracking down
      all the windy history for this.
      
      Basically, this bit me once, and now it's fixed.
      2ba9dc40
    • Rob Swindell's avatar
      Truncate trailing whitespace from FidoNet message header fields · 373dca29
      Rob Swindell authored
      It's unclear whether trailing whitespace is supposed to be significant or not
      (FidoNet specs don't say), but I don't see any reason why "John Doe" and
      "John Doe " should be considered unique senders or recipients. Remove any
      trailing whitespace from message subjects too.
      
      This change makes the trailing whitespace truncation in SMB hash functions
      unnecessary (at least for SBBSecho-imported messages), but most (all?) other
      message transports don't allow for this nonsense in the first place.
      373dca29
  9. May 30, 2023
    • Rob Swindell's avatar
      Strip the "in-transit" attribute flag from imported packed-messages · 73783e2b
      Rob Swindell authored
      Log a warning message when either the "local" or "in-transit" flag has been
      stripped from ("Sanitized") imported packed-messages.
      
      Keyop reported a chksmb warning on a FidoNet message that contained the
      'in-transit' attribute:
      <Keyop> Message flagged as 'In Transit'     (?): 1
      <Keyop> fidonet_fidosoft Message Base has Errors!
      
      The message in question appears just to be a corrupted echomail msg coming
      from HPT:
      Sender           '56:43 '
      To               Tommi Koivula
      Subject          test
      X-FTN-AREA       FIDOSOFT.HUSKY
      X-FTN-TID        hpt/os2-wc 1.9.0-cur 2021-03-14
      
      SBBSecho didn't use to convert/import the "in-transit" flag on imported
      netmail or echomail messages, ... until commit 446ab0ef, which
      was needed to support the TickFix robot. So now, let's just sanitize the
      packed-message attributes a little sooner in the import process and log a
      warning when such sanitization has taken place.
      73783e2b
    • Rob Swindell's avatar
      Add option (for deon) to notify offline users of new received email (SMTP) msgs · 543620f3
      Rob Swindell authored
      The notification of offline users was removed from the mail server 13 years
      ago (commit 729eb16b) without a lot of fanfare or explanation. Add an
      option for notification of offline users (in addition to online users) for
      those sysops that want that behavior.
      
      Use the userdat is_user_online() function in place of the getnodedat() loop,
      which also wasn't considering nodes in "logon" status as having a user online.
      543620f3
  10. May 27, 2023
  11. May 26, 2023
  12. May 25, 2023
Loading