- Jan 24, 2023
-
-
Rob Swindell authored
-
Rob Swindell authored
This fixes issue #495.
-
- Jan 23, 2023
-
-
Rob Swindell authored
-
Rob Swindell authored
The sub_t.subnum's that were being updated as message areas were being saved to msgs.ini could not be used as an index into the scfg_t.sub array at this point (the subnum would be the new index position when the msgs.ini was re-read/loaded) . This was not an issue in v3.19 because we just saved the subnum (to msgs.cnf) and in v3.20, we save the sub's internal code (to msgs.ini) and were using the newly updated sub_t.subnum to find the corresponding sub_t for that internal code. Since the subnum is not used now during the save process, no need to update it here (this reverses part of the commit 11e529d4 from 5 years ago). This fixes issue #502 - thanks to the irc.synchro.netizens that reported it!
-
- Jan 22, 2023
-
-
Rob Swindell authored
IF user hits 'Q' (or whatever the "Quit" key is), set the default protocol field in the user record to " " (instead of an empty string). If user hits abort (Ctrl-C), don't make any change to the default protocol.
-
Rob Swindell authored
A blank download protocol field in a user.dat, when parsed, sets the 'prot' field of user_t to 0. When writing the record back to the user.dat, this would prematurely truncate all other fields off the user record (since strings in C are NUL terminated and we're using sprintf() to format the record and %c specifier for that field). The fix is to write a ' ' character instead of '\0' if the user_t.prot is '\0'. As part of this fix, I'm writing a '?' if a user_t.sex is '\0' (not sure if this is actually possible, but just as insurance). Those are the only 2 single-character user properties/fields today. Bug reported/debugged by Al of The Rusty Mailbox (1:153/757.2) - thank you!
-
- Jan 21, 2023
-
-
Rob Swindell authored
This function has been causing somewhat rare crashes (e.g. one per week on a very active system with MQTT enabled) on both Windows and Linux (see issue #495). The root-cause is still unclear (possible heap corruption?). This function needed more robustification anyway (see previous TODO comment), so I'm refactoring here to no longer use strListAppendFormat, which uses vasprintf (the function where the rare crash was occurring) and instead just use snprintf and strListPush. The total client_list that's published (as a single string/message) is now dynamically allocated (this was the point of the previous TODO comment). This may not actually fix the issue if there's a heap corruption occurring somewhere else in this function or the call-chain that's reaching here (usually from the web server). Another change to mqtt_client_on(): don't incremented the server's 'served' counter until client disconnects (this is a past-tense statistic). Also: - mqtt_pub_strval() can now accept a null 'str' argument which is effectively the same as mqtt_pub_noval(), so the pub_noval() function is now just a thin wrapper around pub_strval(). - mqtt_startup() now clears the client_list topic and sets the client_count topic to 0.
-
Rob Swindell authored
Reduce occurrences of subsequent errors (unsure of root-cause): !ERROR 2 (No such file or directory) in main.cpp line 2778 (event_thread) removing "/sbbs/data/pack0341.now" This does seem to be the only location that deleted pack*.now files, so weird that they'd disappear sometime after calling glob(), but I do understand that its theoretically possible.
-
Rob Swindell authored
No immediate need/use.
-
- Jan 17, 2023
-
-
Rob Swindell authored
to remove all sections in an .ini file or all sections with a specified prefix.
-
- Jan 13, 2023
-
-
Rob Swindell authored
Allows for more/better wildcard matching in viewable and testable file types and download-events (e.g. "tar.gz" or "tar.*"). This solves the "double-dot" problem in some file types/extensions. An implicit "*." is prepended before the configured file type/extension.
-
Rob Swindell authored
If libarchive couldn't extract a QWK or REP packet, we'd fallback to searching for a match among the configured extractable file types and if no extension/type match was found, default to the first configured extractable file type (even if there wasn't one) which would result in a NULL pointer dereference and most likely a crash. Instead, if no matching configured extractable file type is found, just log a warning message and don't continue with the extraction attempt. With SBBS v3.19+, it's totally valid/legit to have no extractable file types configured in SCFG and things "just work" (using libarchive).
-
Rob Swindell authored
For Viewable, Testable, Compressible file types and download events, the file extension is no longer limited to 3 characters. 15 characters seemed like "enough". Similarly, a user's temp/QWK file type preference is also extended from 3 to 15 characters. This fixes issue #486, but file types such as *.tar.gz (2 dots in the extension) are still an issue and will be addressed next.
-
- Jan 12, 2023
-
-
Rob Swindell authored
... but the old user.dat fields would still just be 16 chars in size. Also a strcpy -> SAFECOPY conversion for user tmpext.
-
Rob Swindell authored
-
- Jan 09, 2023
-
-
Rob Swindell authored
-
Rob Swindell authored
I read that 3.1.1 is much more widely supported, but perhaps that was old info.
-
Rob Swindell authored
When MQTT protocol version is >= 5, just log to the */log topic (the level is a property). This means you can't subscribe only to specific log levels when using MQTT v5 so I may re-think this, but I don't want to keep publishing every single log message twice.
-
Rob Swindell authored
-
Rob Swindell authored
-
- Jan 06, 2023
-
-
Deucе authored
Value is "http" or "https" depending on if TLS is in use.
-
- Jan 05, 2023
-
-
Rob Swindell authored
This can be useful when debugging issues (e.g. crashes) and an MQTT consuming/logging client wasn't connected at the time.
-
Rob Swindell authored
Yes, someone could have a local hostname of "node". <sigh>
-
Rob Swindell authored
This solves the problem of subscribing to "sbbs/+/+/+" and getting node status in addition to server status (very different formatted messages). Also include a change for the singular-again "node" topic
-
Rob Swindell authored
-
Rob Swindell authored
If a configuration had *no* command shells, this would have caused a crash here in SCFG. Also, when selecting the new user command shell, default to the current selection.
-
Rob Swindell authored
Should fix the segfault reported by NeoArata_ in #synchronet Also include singular/plural error/s in server status messages.
-
- Jan 04, 2023
-
-
Rob Swindell authored
-
Rob Swindell authored
<server>/state is now published directly to the <sever> topic level (the "state" topic goes away). Moved <bbs-id>/node# topics to <bbs-id>/nodes/# (allows better wild-card subscription per MQTT standards). Publishing total node count to <bbs-id>/nodes rather than <bbs-id>/node_count Introduced "publish verbosity" control (defaults to "High") - if you want nice human readable (and sometimes redundant) topic messages, leave this set to "High". To reduce traffic, set to "Low". It's expected that purpose-built Synchronet/MQTT clients should work equally-well with either setting, but when using generic MQTT clients/browser, "high" verbosity is nice. The human-readable node status is only published when "high" verbosity is enabled. Publishing the BBS name to the <bbs-id> topic, the instance hostname (as configured in sbbs.ini) to the <host> topic. Makes the hierarchy much more clear when using an MQTT browser like MQTT Explorer.
-
Rob Swindell authored
This is more consistent with how these events are logged in a BBS-common log file in data/*.log. This change also restores the server abbreviation to the error log entries that used to be there until recently.
-
Rob Swindell authored
Makes for a nice node listing with pure-text MQTT clients/tools
-
Rob Swindell authored
-
Rob Swindell authored
-
Rob Swindell authored
-
Rob Swindell authored
Each Synchronet server is now its own MQTT client. This means there's no longer any MQTT logic in the Synchronet "hosts" (e.g. sbbscon.c, ctrl/*.cpp) and none needed for SBBS NT services (they'll "just work" with MQTT). This also means that just about everything (except for nodes, spam and hack) is now published per-server (in the sbbs/BBS-ID/hostname/server/ topic branch) and if you want aggregated totals or client lists, you'll have to do that in your own MQTT client or dashboard. I also removed the publishing of thread_count and socket_count topics as they weren't universally supported across all servers and are of questionable value. They can be added back later if determined to be useful.
-
Rob Swindell authored
A set_state() may be called with SERVER_STOPPED while recycling.
-
Rob Swindell authored
any server "running" is not enough because the server could still be initializing, re-initializing, or even shutting down.
-
- Jan 03, 2023
-
-
Rob Swindell authored
This solves the problem of any signal (even HUP) ungracefully terminating sbbs (on *nix) when MQTT was enabled. As reported by Nightfox on IRC.
-
Rob Swindell authored
-
Rob Swindell authored
-