From e031af0665be9f368401abbe461c39953a8e672b Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Wed, 11 Mar 2026 15:33:43 +0100 Subject: [PATCH] USRP: usrp-tx-write-thread: return number of samples written At least writerProcessWaitingQueue() checks for the exact number of samples written. In many other places, we check that the return is non-zero. The usrp-tx-write-thread functionality returned 0, which triggers various problems. Return the number of samples, as in the "direct write" case (if-block before else-block). Co-authored-by: Sagar Arora --- radio/USRP/usrp_lib.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radio/USRP/usrp_lib.cpp b/radio/USRP/usrp_lib.cpp index f224b75354..7cd0f47ee0 100644 --- a/radio/USRP/usrp_lib.cpp +++ b/radio/USRP/usrp_lib.cpp @@ -553,7 +553,7 @@ static int trx_usrp_write(openair0_device_t *device, LOG_D(HW, "Signaling TX TS %llu\n", (unsigned long long)timestamp); pthread_cond_signal(&write_thread->cond_write); pthread_mutex_unlock(&write_thread->mutex_write); - return 0; + return nsamps; } }