Skip to content

Commit

Permalink
gnrc_icmpv6_error: use netapi_dispatch_send instead of netapi_send
Browse files Browse the repository at this point in the history
  • Loading branch information
miri64 committed Nov 16, 2018
1 parent ba13d8f commit c8c8564
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sys/net/gnrc/network_layer/icmpv6/error/gnrc_icmpv6_error.c
Expand Up @@ -128,7 +128,12 @@ static gnrc_pktsnip_t *_param_prob_build(uint8_t code, void *ptr,
static void _send(gnrc_pktsnip_t *pkt)
{
if (pkt != NULL) {
gnrc_netapi_send(gnrc_ipv6_pid, pkt);
if (!gnrc_netapi_dispatch_send(GNRC_NETTYPE_IPV6,
GNRC_NETREG_DEMUX_CTX_ALL,
pkt)) {
DEBUG("gnrc_icmpv6_error: No send handler found.\n");
gnrc_pktbuf_release(pkt);
}
}
else {
DEBUG("gnrc_icmpv6_error: No space in packet buffer left\n");
Expand Down

0 comments on commit c8c8564

Please sign in to comment.