Skip to content
Snippets Groups Projects
  1. Jan 14, 2025
  2. Jan 11, 2025
  3. Nov 03, 2024
  4. Sep 21, 2024
    • Rob Swindell's avatar
      Don't update/rewrite dsts.ini when iniReadFile returns NULL · cd049a4e
      Rob Swindell authored
      Even if the empty, iniReadFile() should return an empty list (not NULL),
      NULL indicates a file read (or unlikely malloc failure) - so don't write back
      what we read and return false (result) instead.
      
      Part of likely work-around of issue #791: it's better to not increment stats
      upon a file read error than to reset them all to zero.
      cd049a4e
    • Rob Swindell's avatar
      fread_dstats() will now return false upon file read failure · f4d4eaad
      Rob Swindell authored
      The file position should always be at the EOF after reading the contents.
      
      This should help detect (log errors) upon potential cause of issue #791.
      
      - use a little easier to read .ini style
      - add a NULL argument check to local function write_dstats()
        return false rather than deref the NULL pointer
      f4d4eaad
  5. Sep 20, 2024
  6. Sep 18, 2024
  7. Jan 20, 2024
    • Rob Swindell's avatar
      The great BOOL->bool conversion in xpdev · 118984e9
      Rob Swindell authored
      Still using BOOL where we need Win32 API compatibility.
      Using JSBool instead of BOOL or bool where it matters.
      Changed most relevant TRUE/FALSE to true/false too (though it's not as critical).
      
      You shouldn't need to #include <stdbool.h> anywhere now - gen_defs.h should do that automatically/correctly based on the language/version/tool. In C23, stdbool.h isn't even needed for bool/true/false definitions (they're keywords), so we don't bother including stdbool.h in that case.
      Microsoft didn't define __STDC_VERSION__ in their older tool chains (even though they were C99 compatible and had stdbool.h), so we use a _MSC_VER check to know that there's a stdbool.h we should use in that case.
      
      For other/old compilers (e.g. Borland C) we #define bool/true/false following the pattern of stdbool.h (doesn't use a typedef).
      
      I didn't convert UIFC yet.
      
      This addresses issue #698
      118984e9
  8. Oct 22, 2023
    • Rob Swindell's avatar
      Don't log an error if there's no dsts.ini or dsts.dab file · eb892357
      Rob Swindell authored
      In a fresh install, neither of these files would exist, and that's normal,
      so getstats() should just return true in that case (with the stats struct
      zeroed-out).
      
      Fixes error during login to a new install reported by Zoltán Gábor on
      Facebook.
      eb892357
  9. 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
  10. 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
  11. Feb 19, 2023
  12. Sep 17, 2022
  13. Mar 30, 2022
  14. Mar 29, 2022
  15. Mar 28, 2022
    • Rob Swindell's avatar
      Resolve new GCC warnings · a94d291e
      Rob Swindell authored
      a94d291e
    • Rob Swindell's avatar
      Overhaul statistics files · f963dcbf
      Rob Swindell authored
      */dsts.dab (daily statistics and running totals) -> */dsts.ini
      */csts.dab (cumulative statistics / log) -> */csts.tab
      
      * dsts.ini now has both daily and total stats for all fields (not just timeon and logons).
      * dsts.ini is now an easily modifiable text file - no longer need dstsedit (here-by deprecated and soon to be deleted)
      * dsts.ini and csts.tab support 64-bit upload/download byte stats and are very extensible for future fields to be added or extended > 32-bit (this was the main inspiration for this overhaul, but it was overdue and already designed for v4, pretty much)
      * csts.tab is a tab-delimited fixed length record format suitable for easy import to a spreadsheet program or parsing with scripts. Each day is a 128-character LF-delimited record with tab-delimited fields of plain ASCII text.
      * All fields except timeon in dsts.ini files are updated immediately and by more non-terminal servers (e.g. post statistics from web UI scripts).
      * New user stats are tracked more than just for "today".
      
      The upgrade of these files is automatic and built-into SBBS.
      
      Still to do: overhaul the slog utility to support the new csts.tab file format.
      f963dcbf
  16. Mar 24, 2022
  17. Apr 04, 2021
  18. Feb 15, 2021
    • Rob Swindell's avatar
      Address more Coverity issues · 141e01bf
      Rob Swindell authored
      Reverted the SAFECOPY() NULL source-pointer magic "(null)" string thing as that caused a different Coverity issue. Explicitly check for NULL at the call-sites instead.
      141e01bf
    • Rob Swindell's avatar
      Address more Coverity issues · dd000f6e
      Rob Swindell authored
      Reverted the SAFECOPY() NULL source-pointer magic "(null)" string thing as that caused a different Coverity issue. Explicitly check for NULL at the call-sites instead.
      dd000f6e
  19. Nov 23, 2020
  20. Sep 26, 2020
    • Rob Swindell's avatar
      For subs that allow voting, getposts() will exclude vote messages from total. · c2f7ebef
      Rob Swindell authored
      Vote messages and poll closures are not displayed to users as messages, so
      exclude them from the total "posts" returned from getposts(). This uses
      the new smb_msg_count() function which is slower than simply checking the
      size of the index file (*.sid) and dividing by the index record size. So
      for sub-boards that don't support voting, use the old/faster scheme.
      c2f7ebef
  21. Aug 16, 2020
  22. Apr 11, 2020
    • rswindell's avatar
      Two unrelated changes, but since they touched sbbs.h, I'm committing them · 0d73dbc4
      rswindell authored
      together to keep things atomic:
      1. Eliminate eprintf() as sbbs_t::lputs() and sbbs_t::lprintf() do the
         "right thing" (e.g. log to the event log when called from the event_thread).
      2. Moved upload_stats() and download_stats() from ftpsrvr.c to getstats.c where
          I plan to make use of them for JS-based upload/download file support.
      0d73dbc4
  23. Jul 24, 2018
    • rswindell's avatar
      The great Copyright year update and (mostly) removal of 2018: · f869ad3d
      rswindell authored
      Most of the copyright years in the source code were misleading (the date of
      most recent publish was actually later) and all were unnecessary. I've been
      removing copyright years piecemeal, for a long time, but I decided it was time
      to just perform a bulk search and (mostly) replace. In some cases, I left
      old copyright years on files that either are not used (and soon to be removed)
      or obsolete and unlikely to ever be touched again (e.g. Win9x FOSSIL VXD). Some
      of the runtime binaries still contain copyright years and those were updated to
      2018.
      f869ad3d
  24. Mar 06, 2010
  25. Jul 08, 2007
  26. May 18, 2003
  27. Jul 27, 2002
  28. Dec 27, 2001
  29. Nov 08, 2000
  30. Oct 10, 2000
Loading