Skip to content

Commit

Permalink
Fix int map init
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc committed Jan 13, 2025
1 parent e9fb8dc commit 744fa1b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/zenoh-pico/net/session.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ typedef struct _z_session_t {
#endif

#if Z_FEATURE_INTEREST == 1
_z_matching_listener_item_intmap_t *_matching_listeners;
_z_matching_listener_item_intmap_t _matching_listeners;
#endif

// Session interests
Expand Down
4 changes: 2 additions & 2 deletions src/session/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ z_result_t _z_session_init(_z_session_t *zn, const _z_id_t *zid) {
#endif

#if Z_FEATURE_MATCHING == 1
zn->_matching_listeners = NULL;
zn->_matching_listeners = _z_matching_listener_item_intmap_make();
#endif

_z_interest_init(zn);
Expand Down Expand Up @@ -148,7 +148,7 @@ void _z_session_clear(_z_session_t *zn) {
#endif

#if Z_FEATURE_MATCHING == 1
_z_matching_listener_item_intmap_clear(zn->_matching_listeners);
_z_matching_listener_item_intmap_clear(&zn->_matching_listeners);
#endif

_z_flush_interest(zn);
Expand Down

0 comments on commit 744fa1b

Please sign in to comment.