Skip to content
Snippets Groups Projects
  1. Feb 01, 2025
  2. Jan 20, 2025
  3. Jan 14, 2025
  4. 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
  5. Dec 02, 2024
  6. 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
  7. Sep 25, 2023
  8. 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
  9. Mar 11, 2023
  10. Oct 18, 2022
    • Rob Swindell's avatar
      Full read/write support of new user.tab userbase file · 8a22b246
      Rob Swindell authored
      Also resolved some 32 vs 64-bit 'long' issues/ambiguities that have long-remained. :-)
      
      This commit also removes logon.lst file support.
      
      There's a TODO block remaining in js_user.c for setting portions of a user's birthdate (e.g. just the year or month or day).
      8a22b246
  11. Feb 24, 2022
  12. Jun 06, 2021
  13. Apr 04, 2021
    • Rob Swindell's avatar
      A poll() failure with EINTR does not mean a socket is closed. · 925e3b0a
      Rob Swindell authored
      This won't impact Synchronet as it has a separate signal handling
      thread, but we still need to behave properly for processes that
      don't.  I'm also saying that ENOMEM does not indicate a disconnection,
      though it may be better to pretend it was disconnected...
      925e3b0a
  14. Feb 18, 2021
  15. Aug 16, 2020
  16. May 14, 2020
    • rswindell's avatar
      No longer dynamically allocate compiled access requirment (AR) strings for configuration items. · 110cc8ac
      rswindell authored
      SCFG for Win32 is linked against a load_cfg lib that builds withOUT SCFG defined, so these compiled AR elements were allocated and then many SCFG operations (e.g. copy/paste, create new) would copy the allocated ARs to another configuration and then be subjected to double-free upon exit/clean-up (resulting in exception or crash).
      Just get rid of this cruft and some other related RAM-byte-saving hold-overs from the MS-DOS days.
      110cc8ac
  17. Feb 20, 2019
    • rswindell's avatar
      Reversed course on the WM_QUOTE mode handling in sbbs_t::postmsg() · 57424543
      rswindell authored
      (JS bbs.post_msg()): If the WM_QUOTE mode flag is *not* set, then it will auto-
      create the quote file (quotes.txt) and add the WM_QUOTE mode bit before calling
      sbbs_t::writemsg(). So if existing JS scripts call bbs.post_msg(..., WM_QUOTE)
      with a custom-created quote file (e.g. with msg tails), that'll still work as
      before (e.g. DDMsgReader.js).
      
      bbs.email() and bbs.netmail() now support an optional reply_header_object
      argument which works like bbs.post_msg(). These methods (and the underlying
      C++ methods: sbbs_t::email(), netmail(), inetmail(), all auto-create the
      quote file now, when the WM_QUOTE mode flag is *not* set.
      
      The auto-created quotes.txt now includes the plain-text version of MIME-encoded
      messages.
      
      the bbs.post_msg(), email(), and netmail() methods now all support reply
      header objects that came directly from bbs.get_msg_header() *or* copies of
      such header objects (but the auto-quoting feature won't work when supplied
      this type of header object). So if passed a header object returned from
      bbs.get_msg_header(), we can now use the message base (for auto-quoting) and
      the underlying msg storage directly (no JS parsing necessary). This is what
      the new js_GetMsgHeaderObjectPrivates() function is used for.
      
      js_ParseMsgHeaderObject() (and the underlying parse_header_object() function)
      now supports either an actual internally-generated msg header object (e.g.
      returned from bbs.get_msg_header()) or one that is a copy or hand-constructed.
      
      quotemsg() no longer tries to get a copy of the msg index/header. It shouldn't
      have to since we can now get to underlying msg storage in the js_msgbase.c
      via js_GetMsgHeaderObjectPrivates().
      
      quotemsg() now reads only the plain-text portion of MIME-encoded messages.
      
      As part of this effort, I modernized the method prototypes using default
      argument values (e.g. WM_NONE for wm_mode arguments) and removed some
      extraneous WM_EMAIL and WM_NETMAIL specifications (these wm_mode flags are
      automatically added by the sbbs_t::email() and *netmail() functions).
      
      savemsg() now *does* support reply-IDs/thread-linkage via the additional
      'remsg' argument (when non-NULL).
      
      Replaced some use of nulstr with NULL.
      
      Replaced more boilerplate SMB open code with calls to smb_open_sub().
      57424543
  18. Jul 29, 2018
  19. Jul 25, 2018
  20. Mar 16, 2018
  21. Jul 21, 2011
    • rswindell's avatar
      Enhancement: most question-type text.dat entries are now optional. · 77a2cda0
      rswindell authored
      That is, if any of the following text.dat entries are set to a blank/emtpy
      string (by editing ctrl/text.dat or via run-time script modification), the
      question will not be asked of the user allowing greater sysop-customization
      of hard-coded processes (e.g. new user application):
      ClearUploadQueueQ
      ClearDownloadQueueQ
      HangUpAfterXferQ
      ChatWithGuruInsteadQ
      ForwardMailQ
      DownloadBatchQ
      LogOffQ
      DeleteErrorLogQ
      ClearErrCounter
      DeleteGuruLogQ
      AutoTerminalQ
      AnsiTerminalQ
      ColorTerminalQ
      ExAsciiTerminalQ
      CallingFromNorthAmericaQ
      ReadYourMailNowQ
      NScanAllGrpsQ
      SScanAllGrpsQ
      NewPasswordQ
      ContinueQ
      EnterYourPhoneNumber
      UserInfoCorrectQ
      UseExternalEditorQ
      DownloadAttachedFileQ
      AddSubToNewScanQ (new)
      RemoveFromNewScanQ
      DisplaySubjectsOnlyQ
      Post
      SearchExtendedQ
      ViewSysInfoFileQ
      ViewLogonMsgQ
      WithLineNumbersQ
      77a2cda0
  22. Mar 01, 2011
  23. Mar 20, 2009
  24. Feb 14, 2008
    • rswindell's avatar
      Re-use text.dat entry NoErrorLogExists for reporting DirectoryDoesNotExist and · 4d34cf63
      rswindell authored
      changed FileNotThere text.dat entry to FileDoesNotExist which displays the file
      path.
      Now check if the directory exists before checking the available disk space
      before allowing file uploads and report the correct error (using
      DirectoryDoesNotExist) if the directory is missing (a common mistake).
      Overhaul viewfilecontents() - wow, I can't wait to re-write all of this moldy
      filebase code!
      4d34cf63
  25. Aug 14, 2007
  26. Feb 28, 2006
  27. Sep 20, 2005
  28. Aug 22, 2003
  29. Jul 26, 2003
  30. May 09, 2003
  31. Jan 31, 2003
  32. Nov 13, 2002
  33. Oct 15, 2002
  34. Mar 13, 2002
  35. Feb 07, 2002
Loading