1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-30 08:51:19 +01:00

Merge pull request #2892 from authmillenon/ng_ipv6/enh/use-netapi-rcv

ng_ipv6: use netapi_receive()
This commit is contained in:
Hauke Petersen 2015-04-30 11:00:52 +02:00
commit 195a8d88cd

View File

@ -471,16 +471,12 @@ static inline bool _pkt_not_for_me(kernel_pid_t *iface, ng_ipv6_hdr_t *hdr)
static void _dispatch_rcv_pkt(ng_nettype_t type, uint32_t demux_ctx,
ng_pktsnip_t *pkt)
{
msg_t msg;
ng_netreg_entry_t *entry = ng_netreg_lookup(type, demux_ctx);
msg.type = NG_NETAPI_MSG_TYPE_RCV;
msg.content.ptr = (char *)pkt;
while (entry) {
DEBUG("ipv6: Send receive command for %p to %" PRIu16 "\n", (void *)pkt,
entry->pid);
msg_send(&msg, entry->pid);
ng_netapi_receive(entry->pid, pkt);
entry = ng_netreg_getnext(entry);
}
}