From c3a11c4717fccbf943ef02e6058b07b72e7fc34b Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Tue, 24 Jun 2025 14:28:09 +0000 Subject: [PATCH] NR UE: fix condition when to print the error message in write_reorder_clear_context() We should print the error message when the mutex cannot be locked because it is already locked. Unfortunately, the if() condition was inverted... --- radio/COMMON/common_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radio/COMMON/common_lib.c b/radio/COMMON/common_lib.c index 14b66d7060..670a9cc852 100644 --- a/radio/COMMON/common_lib.c +++ b/radio/COMMON/common_lib.c @@ -276,7 +276,7 @@ void openair0_write_reorder_clear_context(openair0_device *device) re_order_t *ctx = &device->reOrder; if (!ctx->initDone) return; - if (pthread_mutex_trylock(&ctx->mutex_write) == 0) + if (pthread_mutex_trylock(&ctx->mutex_write) != 0) LOG_E(HW, "write_reorder_clear_context call while still writing on the device\n"); pthread_mutex_destroy(&ctx->mutex_write); pthread_mutex_lock(&ctx->mutex_store);