From d9b1cfb4047c9b94700340a66fc6b1cb3b543f1c Mon Sep 17 00:00:00 2001 From: Mike Black W9MDB Date: Mon, 31 Jul 2023 09:08:34 -0500 Subject: [PATCH] Fix fifo.c mutex handling --- src/fifo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fifo.c b/src/fifo.c index dd91cc86d..7b7056f1c 100644 --- a/src/fifo.c +++ b/src/fifo.c @@ -27,7 +27,6 @@ int push(FIFO_RIG *fifo, const char *msg) #ifdef _PTHREAD_H pthread_mutex_lock(&fifo->mutex); #endif - return RIG_OK; int len = strlen(msg); for (int i = 0; i < len; ++i) @@ -76,10 +75,10 @@ int peek(FIFO_RIG *fifo) else rig_debug(RIG_DEBUG_VERBOSE, "%s: peek 0x%02x (%d,%d)\n", __func__, c, fifo->head, fifo->tail); - return c; #ifdef _PTHREAD_H pthread_mutex_unlock(&fifo->mutex); #endif + return c; } int pop(FIFO_RIG *fifo)