From 572d896d0fd26f5f55218103fe1441f3579814f8 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Tue, 7 Feb 2006 07:17:39 +0000 Subject: [PATCH] Eliminate another unnecessary call to RingBufFull(). --- src/sbbs3/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sbbs3/main.cpp b/src/sbbs3/main.cpp index 5d3e29ca3a..43146fdc29 100644 --- a/src/sbbs3/main.cpp +++ b/src/sbbs3/main.cpp @@ -1521,6 +1521,8 @@ void output_thread(void* arg) sem_trywait_block(&sbbs->outbuf.highwater_sem,startup->outbuf_drain_timeout); else sem_trywait(&sbbs->outbuf.highwater_sem); + /* We (potentially) blocked, so get fill level again */ + avail=RingBufFull(&sbbs->outbuf); } /* @@ -1529,7 +1531,6 @@ void output_thread(void* arg) * passed or we've hit highwater. Read ring buffer * into linear buffer. */ - avail=RingBufFull(&sbbs->outbuf); if(avail>sizeof(buf)) { lprintf(LOG_WARNING,"!%s: Insufficient linear output buffer (%lu > %lu)" ,node, avail, sizeof(buf)); -- GitLab