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...
This commit is contained in:
Thomas Schlichter
2025-06-24 14:41:53 +00:00
parent 0ddba90874
commit c3a11c4717
+1 -1
View File
@@ -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);