Skip to content

Commit

Permalink
Fix single thread build
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc committed Nov 20, 2024
1 parent f87bc4a commit 688e547
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/net/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions src/transport/common/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 688e547

Please sign in to comment.