Skip to content

Commit 3f93d16

Browse files
committed
fix: remove transport_is_here functions
1 parent 20640af commit 3f93d16

File tree

5 files changed

+2
-14
lines changed

5 files changed

+2
-14
lines changed

include/zenoh-pico/transport/multicast.h

-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717

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

20-
bool _zp_is_multicast_here(void);
21-
2220
void _zp_multicast_fetch_zid(const _z_transport_t *zt, z_owned_closure_zid_t *callback);
2321
void _zp_multicast_info_session(const _z_transport_t *zt, _z_config_t *ps);
2422

include/zenoh-pico/transport/unicast.h

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

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

20-
bool _zp_is_unicast_here(void);
2120
void _zp_unicast_fetch_zid(const _z_transport_t *zt, z_owned_closure_zid_t *callback);
2221
void _zp_unicast_info_session(const _z_transport_t *zt, _z_config_t *ps);
2322

src/session/scout.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,8 @@ _z_hello_list_t *_z_scout_inner(const z_what_t what, _z_id_t zid, const char *lo
141141
_z_scouting_message_encode(&wbf, &scout);
142142

143143
// Scout on multicast
144-
if (_zp_is_multicast_here()) {
145-
ret = __z_scout_loop(&wbf, locator, timeout, exit_on_first);
146-
}
144+
ret = __z_scout_loop(&wbf, locator, timeout, exit_on_first);
145+
147146
_z_wbuf_clear(&wbf);
148147

149148
return ret;

src/transport/multicast.c

-4
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
#include "zenoh-pico/utils/logging.h"
3131

3232
#if Z_FEATURE_MULTICAST_TRANSPORT == 1
33-
bool _zp_is_multicast_here(void) { return true; }
34-
3533
void _zp_multicast_fetch_zid(const _z_transport_t *zt, z_owned_closure_zid_t *callback) {
3634
void *ctx = callback->context;
3735
_z_transport_peer_entry_list_t *l = zt->_transport._multicast._peers;
@@ -55,8 +53,6 @@ void _zp_multicast_info_session(const _z_transport_t *zt, _z_config_t *ps) {
5553
}
5654

5755
#else
58-
bool _zp_is_multicast_here(void) { return false; }
59-
6056
void _zp_multicast_fetch_zid(const _z_transport_t *zt, z_owned_closure_zid_t *callback) {
6157
_ZP_UNUSED(zt);
6258
_ZP_UNUSED(callback);

src/transport/unicast.c

-4
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
#include "zenoh-pico/utils/logging.h"
3232

3333
#if Z_FEATURE_UNICAST_TRANSPORT == 1
34-
bool _zp_is_unicast_here(void) { return true; }
35-
3634
void _zp_unicast_fetch_zid(const _z_transport_t *zt, z_owned_closure_zid_t *callback) {
3735
void *ctx = callback->context;
3836
z_id_t id = zt->_transport._unicast._remote_zid;
@@ -46,8 +44,6 @@ void _zp_unicast_info_session(const _z_transport_t *zt, _z_config_t *ps) {
4644
}
4745

4846
#else
49-
bool _zp_is_unicast_here(void) { return false; }
50-
5147
void _zp_unicast_fetch_zid(const _z_transport_t *zt, z_owned_closure_zid_t *callback) {
5248
_ZP_UNUSED(zt);
5349
_ZP_UNUSED(callback);

0 commit comments

Comments
 (0)