We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6478548 commit d7b80c5Copy full SHA for d7b80c5
src/transport/unicast/transport.c
@@ -227,6 +227,12 @@ z_result_t _z_unicast_handshake_listen(_z_transport_unicast_establish_param_t *p
227
return _Z_ERR_MESSAGE_UNEXPECTED;
228
}
229
_Z_DEBUG("Received Z_INIT(Syn)");
230
+ // Check if node is in client mode
231
+ if (tmsg._body._init._whatami == Z_WHATAMI_CLIENT) {
232
+ _z_t_msg_clear(&tmsg);
233
+ _Z_INFO("Warning: Peer mode does not support client connection for the moment.");
234
+ return _Z_ERR_GENERIC;
235
+ }
236
// Encode InitAck
237
_z_slice_t cookie = _z_slice_null();
238
_z_transport_message_t iam = _z_t_msg_make_init_ack(mode, *local_zid, cookie);
0 commit comments