- Jan 14, 2025
-
-
Rob Swindell authored
... using uncrustify mod_paren_on_return config
-
Rob Swindell authored
White-space changes only, exception being the rare insertion of NL before closing brace (couldn't find the option to disable that behavior). I excluded some header files (e.g. sbbs.h) since uncrustify seemed to be doing more harm than good there. I might just end up applying different set of rules to .h files.
-
- Jan 11, 2025
-
-
Rob Swindell authored
e.g. [can|is]_subject_something() is now named subject_[can|is]_something() No functional change.
-
- Nov 03, 2024
-
-
Rob Swindell authored
-
Rob Swindell authored
Root-caused this problem to read() failures which are now caught and logged rather than zeroing out the statistics fields.
-
- Sep 21, 2024
-
-
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.
-
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
-
- Sep 20, 2024
-
-
Rob Swindell authored
This should help identify the function(s) used when the corruption occurs.
-
Rob Swindell authored
iniWriteFile() returns bool, not int. Removed inapplicable function comment.
-
Rob Swindell authored
Hopefully help to determine cause of issue #791 (when is the apparent corruption of this file occurring?)
-
- Sep 18, 2024
-
-
Rob Swindell authored
-
Rob Swindell authored
fclose() returns 0 on success.
-
- Jan 20, 2024
-
-
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
-
- Oct 22, 2023
-
-
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.
-
- Jun 09, 2023
-
-
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!
-
- Jun 04, 2023
-
-
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.
-
- Feb 19, 2023
-
-
Rob Swindell authored
Mostly [s]printf format fixups
-
- Sep 17, 2022
-
-
Rob Swindell authored
long is the one type that a different size between the supported 32-bit and 64-bit platforms, avoid its use.
-
- Mar 30, 2022
-
-
Rob Swindell authored
iniFileOpen() does not perform retries and there can be contention for the ctrl/dsts.ini file.
-
- Mar 29, 2022
-
-
Rob Swindell authored
-
- Mar 28, 2022
-
-
Rob Swindell authored
-
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.
-
- Mar 24, 2022
-
-
Rob Swindell authored
-
- Apr 04, 2021
-
-
Rob Swindell authored
This macro has expanded to nothing for a while now and even before, the usage was misguided and unnecessary as explained in this video: https://www.youtube.com/watch?v=cjotPqQxxAY
-
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...
-
- Feb 15, 2021
-
-
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.
-
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.
-
- Nov 23, 2020
-
-
Rob Swindell authored
-
- Sep 26, 2020
-
-
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.
-
- Aug 16, 2020
-
-
Rob Swindell authored
-
- Apr 11, 2020
-
-
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.
-
- Jul 24, 2018
-
-
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.
-
- Mar 06, 2010
-
-
rswindell authored
inserting (long) typedefs to prevent warnings, but in the case of the JS File() class, actually supporting file lengths > 32-bit.
-
- Jul 08, 2007
-
-
deuce authored
-
- May 18, 2003
-
-
rswindell authored
-
- Jul 27, 2002
-
-
rswindell authored
-
- Dec 27, 2001
-
-
rswindell authored
-
- Nov 08, 2000
-
-
rswindell authored
-
- Oct 10, 2000
-
-
rswindell authored
-