BBS:      TELESC.NET.BR
Assunto:  src/sbbs3/ringbuf.c
De:       Deuc¨
Data:     Thu, 21 May 2026 20:58:10 -0700
-----------------------------------------------------------
https://gitlab.synchro.net/main/sbbs/-/commit/d898b01aeacc032b0471fdd2
Modified Files:
	src/sbbs3/ringbuf.c
Log Message:
ringbuf: fix RingBufReInit not clearing highwater_event

After pHead=pTail=pStart the ring is empty (fill==0), so the
highwater_event should always be in the reset state on return.  The
existing guard tested `RINGBUF_FILL_LEVEL(rb) >= rb->highwater_mark`,
which is never true at this point, so the ResetEvent was never called
and a previously-set highwater_event survived the reinit.  Whoever next
waited on it then took the "highwater reached" path against an empty
ring.

Drop the unsatisfiable fill check; keep only the "event configured"
guards so the call is a no-op when events or a highwater mark aren't
in use.

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

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