Skip to content

Commit ab4195f

Browse files
committed
Fix return codes
1 parent 3d320dd commit ab4195f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

examples/riot/coap_channel/coap_udp_ip_channel.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ static lf_ret_t CoapUdpIpChannel_open_connection(NetworkChannel *untyped_self) {
201201
// Do nothing
202202

203203
self->state = NETWORK_CHANNEL_STATE_OPEN;
204+
205+
return LF_OK;
204206
}
205207

206208
static void _client_try_connect_callback(const gcoap_request_memo_t *memo, coap_pkt_t *pdu,
@@ -253,6 +255,8 @@ static lf_ret_t CoapUdpIpChannel_try_connect(NetworkChannel *untyped_self) {
253255
case NETWORK_CHANNEL_STATE_CLOSED:
254256
return LF_ERR;
255257
}
258+
259+
return LF_ERR;
256260
}
257261

258262
static void _client_close_connection_callback(const gcoap_request_memo_t *memo, coap_pkt_t *pdu,
@@ -291,7 +295,11 @@ static lf_ret_t CoapUdpIpChannel_send_blocking(NetworkChannel *untyped_self, con
291295
CoapUdpIpChannel *self = (CoapUdpIpChannel *)untyped_self;
292296

293297
// Send message
294-
_send_coap_message_with_payload(self, &self->remote, "/message", _client_send_blocking_callback, message);
298+
if (_send_coap_message_with_payload(self, &self->remote, "/message", _client_send_blocking_callback, message)) {
299+
return LF_OK;
300+
}
301+
302+
return LF_ERR;
295303
}
296304

297305
static void CoapUdpIpChannel_register_receive_callback(NetworkChannel *untyped_self,

0 commit comments

Comments
 (0)