https://gitlab.synchro.net/main/sbbs/-/commit/fd16298c62e1a5ee1e410937
Modified Files:
docs/v322_new.md src/sbbs3/sbbs_ini.c
Log Message:
sbbs.ini: warn when a server-setting string value doesn't fit its field
The same silent truncation as the previous commit, for the server
settings sbbs_read_ini() copies into the *_startup_t structs. The config-library helper could not simply be reused here: sbbs.ini is read
by the host program (sbbscon, sbbsctrl, ...) before any server exists,
and libsbbs's lprintf() drops output until a server has installed its
startup struct, as the first test showed (the xtrn.ini warning logged,
the sbbs.ini one vanished). Two of the programs that compile this file,
ntsvcs and sbbsctrl, provide no lprintf() of their own either.
So the reader reports through the log callback (lputs/cbdata) of the
startup struct it is filling, which every *_startup_t carries in its
common leading members and which sbbscon installs before it reads the
ini; a program that installed none stays silent, as before. A local ini_get_str() does the lookup and the checked copy, and the 51 copy
sites move onto its INI_GET_STR() macro.
Verified on a scratch install with a 265-character [BBS]
LoginRequirements: sbbscon logs "!Config value 'LoginRequirements'
truncated from 265 to 40 chars: ..." at startup, before the servers'
own messages. Only the Linux build is verified.
Co-Authored-By: Claude Fable 5.1 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net