Skip to content
Snippets Groups Projects
Commit 318bc536 authored by Matthias Kolja Miehl's avatar Matthias Kolja Miehl
Browse files

pkg/emb6: emb6_conn_udp: fix nullPointer error

parent 39ecc12d
Branches
No related tags found
No related merge requests found
......@@ -230,11 +230,12 @@ static void _input_callback(struct udp_socket *c, void *ptr,
static void _output_callback(c_event_t c_event, p_data_t p_data)
{
_send_cmd_t *send_cmd = (_send_cmd_t *)p_data;
if ((c_event != EVENT_TYPE_CONN_SEND) || (p_data == NULL)) {
return;
}
_send_cmd_t *send_cmd = (_send_cmd_t *)p_data;
if ((send_cmd->res = udp_socket_send(&send_cmd->sock, send_cmd->data, send_cmd->data_len)) < 0) {
send_cmd->res = -EHOSTUNREACH;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment