Skip to content

Commit

Permalink
fix: remove transport_is_here functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-roland committed Nov 15, 2023
1 parent 20640af commit 3f93d16
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 14 deletions.
2 changes: 0 additions & 2 deletions include/zenoh-pico/transport/multicast.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

#include "zenoh-pico/api/types.h"

bool _zp_is_multicast_here(void);

void _zp_multicast_fetch_zid(const _z_transport_t *zt, z_owned_closure_zid_t *callback);
void _zp_multicast_info_session(const _z_transport_t *zt, _z_config_t *ps);

Expand Down
1 change: 0 additions & 1 deletion include/zenoh-pico/transport/unicast.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#include "zenoh-pico/api/types.h"

bool _zp_is_unicast_here(void);
void _zp_unicast_fetch_zid(const _z_transport_t *zt, z_owned_closure_zid_t *callback);
void _zp_unicast_info_session(const _z_transport_t *zt, _z_config_t *ps);

Expand Down
5 changes: 2 additions & 3 deletions src/session/scout.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,8 @@ _z_hello_list_t *_z_scout_inner(const z_what_t what, _z_id_t zid, const char *lo
_z_scouting_message_encode(&wbf, &scout);

// Scout on multicast
if (_zp_is_multicast_here()) {
ret = __z_scout_loop(&wbf, locator, timeout, exit_on_first);
}
ret = __z_scout_loop(&wbf, locator, timeout, exit_on_first);

_z_wbuf_clear(&wbf);

return ret;
Expand Down
4 changes: 0 additions & 4 deletions src/transport/multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
#include "zenoh-pico/utils/logging.h"

#if Z_FEATURE_MULTICAST_TRANSPORT == 1
bool _zp_is_multicast_here(void) { return true; }

void _zp_multicast_fetch_zid(const _z_transport_t *zt, z_owned_closure_zid_t *callback) {
void *ctx = callback->context;
_z_transport_peer_entry_list_t *l = zt->_transport._multicast._peers;
Expand All @@ -55,8 +53,6 @@ void _zp_multicast_info_session(const _z_transport_t *zt, _z_config_t *ps) {
}

#else
bool _zp_is_multicast_here(void) { return false; }

void _zp_multicast_fetch_zid(const _z_transport_t *zt, z_owned_closure_zid_t *callback) {
_ZP_UNUSED(zt);
_ZP_UNUSED(callback);
Expand Down
4 changes: 0 additions & 4 deletions src/transport/unicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
#include "zenoh-pico/utils/logging.h"

#if Z_FEATURE_UNICAST_TRANSPORT == 1
bool _zp_is_unicast_here(void) { return true; }

void _zp_unicast_fetch_zid(const _z_transport_t *zt, z_owned_closure_zid_t *callback) {
void *ctx = callback->context;
z_id_t id = zt->_transport._unicast._remote_zid;
Expand All @@ -46,8 +44,6 @@ void _zp_unicast_info_session(const _z_transport_t *zt, _z_config_t *ps) {
}

#else
bool _zp_is_unicast_here(void) { return false; }

void _zp_unicast_fetch_zid(const _z_transport_t *zt, z_owned_closure_zid_t *callback) {
_ZP_UNUSED(zt);
_ZP_UNUSED(callback);
Expand Down

0 comments on commit 3f93d16

Please sign in to comment.