BBS:      TELESC.NET.BR
Assunto:  src/sbbs3/ftpsrvr.cpp
De:       Rob Swindell (on Debian Linux)
Data:     Wed, 20 May 2026 17:10:12 -0700
-----------------------------------------------------------
https://gitlab.synchro.net/main/sbbs/-/commit/19c8264107387b59dfe2dc70
Modified Files:
	src/sbbs3/ftpsrvr.cpp
Log Message:
ftpsrvr: add errprintf() and route LOG_ERR/LOG_CRIT through it for de-dup

The FTP server logged every error via lprintf(LOG_ERR/LOG_CRIT, ...),
which writes each record to error.log with no repeat suppression. Under
file-descriptor exhaustion (EMFILE) a single busy server flooded
error.log with thousands of near-identical entries.

Mirror the mailsrvr/websrvr/services pattern: add a static errprintf()
that calls repeated_error(line, function) and demotes a consecutive
repeat of the same site to LOG_WARNING (which falls out of error.log).
Convert all 48 LOG_ERR/LOG_CRIT lprintf() call sites to
errprintf(..., WHERE, ...).

This is log de-duplication only; it does not address the underlying
descriptor exhaustion. Note repeated_error() tracks only the single
most-recent (line, function), so interleaved failures from many
concurrent sessions are only partially collapsed.

Co-Authored-By: Claude Opus 4.7 
n
---
  mSynchronetn  hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net

-----------------------------------------------------------
[Voltar]