Skip to content
Snippets Groups Projects
  1. Feb 01, 2025
    • Rob Swindell's avatar
      Rename SS_NEWDAY to SS_DATE_CHANGED · 486b5e6a
      Rob Swindell authored
      Embarassingly, I'd added SS_NEW_DAY recently (for a different purpose) with
      such a similiar name. So let's rename this flag since it serves a very
      different purpose and avoid the confusion between the two flags.
      486b5e6a
  2. Jan 14, 2025
  3. Jan 05, 2025
  4. Dec 24, 2024
    • Rob Swindell's avatar
      Use opennodedat() always to open the node.dab file · f1243ec4
      Rob Swindell authored
      Include O_CREAT access mode flag in opennodedat().
      
      I experimented with excluding O_DENYNONE when the NM_CLOSENODEDAB flag is set
      (to hopefully work-around MacOS Samba node.dab corruption issue), but that
      didn't work with SBBSCTRL leaving the file open in SH_DENYNONE mode, so will
      have revist that, but using a common open function helps.
      f1243ec4
  5. Dec 17, 2024
    • Rob Swindell's avatar
      Add/user sbbs_t::getuseron() for better user.tab error logging/handling · ac673ac6
      Rob Swindell authored
      Looking into potential causes of issue #843, I found several instances where
      we call getuserdat() without checking the return value and restoring the
      useron.number to the current user number upon error: getuserdat() zeroes out
      the user struct/number upon error, a bad API choice made 23 years ago.
      
      Replace those instances with calls to sbbs_t::getuseron() which logs any
      open/lock/read failures of the user.tab and does not modify/zero-out the
      sbbs_t::useron struct upon error.
      ac673ac6
  6. Dec 08, 2024
    • Rob Swindell's avatar
      Fix use of unitialize variable · 801010bf
      Rob Swindell authored
      Since we we're not using opennodeext(), we don't have the path/fname for
      any failure error message here.
      
      CID 515714
      801010bf
    • Rob Swindell's avatar
    • Rob Swindell's avatar
      Overhaul how custom Node actions and status strings are handled · d116f362
      Rob Swindell authored
      Custom NodeStatus and NodeAction/Activity strings are now displayed pretty
      much everywhere possible (except the node utility, since it doesn't read
      any configuration files). This fixes issue #618, finally.
      
      If you have custom (non-blank) NodeAction* strings in your text.dat/text.ini
      file, or you change these strings during runtime (e.g. using bbs.replace_text)
      this will impact you:
      - do not include the user name or any other fields normally included in
        printed node status in your string - just the customized node action and
        really, you should only use/override these strings for dynamically changing
        node status (i.e. you're using NodeActionCustom and you're setting different
        custom strings depending on current node activity). Consider using the new
        NodeActivity* text.dat strings instead if your customized string doesn't
        change during run-time.
      - don't use the %s/%u/%d specifiers any more - use @-codes instead, if needed
      
      If you want static/permanent node action strings, set new new NodeActivity*
      strings in your text.dat or (preferrbaly) text.ini file instead.
      This means the node actions can now be localized for other languagues!
      
      I'm still using the node.exb file (I did consider alternatives, e.g.
      node.ini or node*/activity.asc), but decided to postpone such a change.
      The node.exb file is still used, but the strings represent just the custom
      (extended) node *activity* and not the entire node status string.
      
      Use of Ctrl-A codes needs to be considered/accounted-for (currently isn't).
      d116f362
  7. Dec 02, 2024
  8. Dec 01, 2024
    • Rob Swindell's avatar
      Simplify the getnode.cpp API - use bool returns, default paramaeter value · 62ed3d3a
      Rob Swindell authored
      getnodedat() now performs a non-locked read by default.
      
      Perform more checks of getnodedat() return value before calling putnodedat()
      to avoid unintentionally zeroing out node.dab records.
      
      Add/use unlocknodedat() method for unlocking a node.dab record without
      writing.
      
      Note: The userdat.c getnodedat() and putnodedat() still return int (i.e. 0 on
      success), so that can be confusing.
      62ed3d3a
  9. Nov 24, 2024
    • Rob Swindell's avatar
      Fix potential deadlock in getnodedat(), observed on macOS · 15e40a45
      Rob Swindell authored
      Upon any node.dab lock or read failure, this code would cause errormsg() which
      would often/usually end up claling getnodedat() which would block forever trying
      to acquire the ndoefile_mutex (introduced in commit b9633069, I'm not clear why).
      
      Unlock/release the mutex *before* calling errormsg().
      15e40a45
  10. Oct 30, 2024
  11. Aug 23, 2024
    • Rob Swindell's avatar
      Don't call utime() on the node.dab file for every read · e93b6dfa
      Rob Swindell authored
      ... this was the cause of some observed unnecessarily high disk/file server
      (Samba) utilization, as we call getnodedat() a lot. utime() opens and closes
      the file, which was already open - and we're not modifying the file, so
      updating the 'modification time' here is wrong anyway.
      
      Disabling this 21-year old bit of logic resulted in a pretty dramatic
      reduction in Samba (smbd) CPU utilization on Vertrauen.
      
      If a BBS actually needes this hack (e.g. for NFS compatibility, as Deuce
      eluded in the comment), they'd be better off just setting the "Keep Node File
      Open" node setting (in SCFG->Nodes) to "No".
      e93b6dfa
  12. Mar 03, 2024
    • Rob Swindell's avatar
      Address the SFTP logon issues (timeout waiting for keypress, node status, etc) · f1276068
      Rob Swindell authored
      For SFTP sessions, there's no shell/terminal, so no need to run command
      shells (with their input timeouts, etc.). Reflect the node connection as
      "via sftp" in the node status. Handle node interruption signal. Probably more
      to do here with node status/actions (e.g. it'd be nice to set the action to
      "uploading or "downloading" when appropriate).
      f1276068
  13. 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
  14. Jun 04, 2023
    • Rob Swindell's avatar
      Fix warnings raised by gcc -D_FORTIFY_SOURCE=3 -O1 · 8667e329
      Rob Swindell authored
      A bunch of possible (but often, not really) use of undefined values.
      Some ignored return values (e.g. of chsize/ftruncate, read, write, fgets).
      
      Other than some added diagnostics upon some of these unexpected syscall
      failures, there should be no change in behavior from this commit.
      8667e329
  15. Mar 11, 2023
  16. Feb 19, 2023
  17. Mar 02, 2022
  18. Feb 23, 2022
    • Rob Swindell's avatar
      Save instant message history (notifications and telegrams) · eaa08728
      Rob Swindell authored
      This should address issue (feature request) #196.
      
      The last 20 sets of displayed messages are stored as data/msgs/<user-num>.last.#.msg. This number is currently hard-coded, but could be configurable in the future. I say "sets" because messages are batched-up and displayed together normally, unless a user is actively polling for new users (e.g. while at the Ctrl-P/PrivateMsg prompt).
      
      This involved getting rid of some copy/pasta in sbbs_t:getsmsg() as well by creating/using/reusing readsmsg().
      eaa08728
  19. Dec 14, 2021
  20. Nov 24, 2020
  21. Sep 18, 2020
  22. Aug 16, 2020
  23. Aug 01, 2020
    • rswindell's avatar
      Auto-detect non-Telnet connections to the terminal server's Telnet port and · 40d829f2
      rswindell authored
      automatically revert to Raw/TCP mode. This resolves the issue of users that
      connect using modem/serial emulators over TCP that do not actually support Telnet and then either try to transfer files, which usually will not work due to escaped (or unescaped) IAC (0xFF) characters, or the user may be sent Telnet Go Ahead (GA) sequences which may display as periodic garbage in their terminal program.
      
      This seemed like a better solution than having (yet another) dedicated terminal server port for "raw" connections over TCP, though a "raw" port still might not be a bad idea for a future enhancement. RLogin is already super close to "raw", so it's probably not really necessary to have another port configured/listening.
      40d829f2
  24. Apr 21, 2020
    • rswindell's avatar
      3 new configurable system loadable modules: · df3de69c
      rswindell authored
      - nodelist (default: "nodelist")
      - who's online (default: "nodelist -active")
      - private message (default: "privatemsg")
      
      This allows the nodelist and private message modules to be "installed" without
      over-riding global hot key events (SCFG->External Programs->Global Hot Key
      Events), allows the Baja functions NODELIST_ALL, NODELIST_USERS, and
      PRIVATE_MESSAGE and JS bbs.list_nodes(), bbs.whos_online(), and
      bbs.private_message() methods to use external modules (JS or Baja)
      automatically.
      
      The old C++ logic remains for these features if the module's are cleared (set
      to a blank string) in SCFG, but at some point, that code will likely be removed.
      df3de69c
  25. Aug 31, 2019
  26. Aug 15, 2019
  27. Oct 09, 2018
  28. Oct 05, 2018
  29. Jul 29, 2018
  30. Jul 26, 2018
  31. Jan 10, 2016
Loading