From 688e547cf58dfb5aa5ebbdd61b8878530851b39f Mon Sep 17 00:00:00 2001 From: Alexander Bushnev Date: Wed, 20 Nov 2024 15:50:39 +0100 Subject: [PATCH] Fix single thread build --- src/net/session.c | 2 ++ src/transport/common/transport.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/net/session.c b/src/net/session.c index 43c07dfe4..644c0b822 100644 --- a/src/net/session.c +++ b/src/net/session.c @@ -180,10 +180,12 @@ z_result_t _z_reopen(_z_session_rc_t *zn) { continue; } +#if Z_FEATURE_MULTI_THREAD == 1 // TODO: currnetly we can come to reopen only from task, so we can restart them // but we have no original attributes (which currently in all known cases is default _zp_start_lease_task(_Z_RC_IN_VAL(zn), NULL); _zp_start_read_task(_Z_RC_IN_VAL(zn), NULL); +#endif // Z_FEATURE_MULTI_THREAD == 1 if (ret == _Z_RES_OK && !_z_network_message_list_is_empty(zs->_decalaration_cache)) { _z_network_message_list_t *iter = zs->_decalaration_cache; diff --git a/src/transport/common/transport.c b/src/transport/common/transport.c index 7be8fcf9b..e32b5a7be 100644 --- a/src/transport/common/transport.c +++ b/src/transport/common/transport.c @@ -17,6 +17,7 @@ #include "zenoh-pico/link/link.h" #include "zenoh-pico/system/platform_common.h" +#include "zenoh-pico/utils/result.h" void _z_common_transport_clear(_z_transport_common_t *ztc, bool detach_tasks) { #if Z_FEATURE_MULTI_THREAD == 1 @@ -45,6 +46,8 @@ void _z_common_transport_clear(_z_transport_common_t *ztc, bool detach_tasks) { // Clean up the mutexes _z_mutex_drop(&ztc->_mutex_tx); _z_mutex_drop(&ztc->_mutex_rx); +#else + _ZP_UNUSED(detach_tasks); #endif // Z_FEATURE_MULTI_THREAD == 1 // Clean up the buffers