[riot-notifications] [RIOT] udp: fix wrong usage of pkt pointer (#3918)

Martine Lenders notifications at github.com
Mon Sep 21 20:38:23 CEST 2015


> @@ -130,9 +130,9 @@ static void _receive(gnrc_pktsnip_t *pkt)
>      port = (uint32_t)byteorder_ntohs(hdr->dst_port);
>  
>      /* send payload to receivers */
> -    if (!gnrc_netapi_dispatch_receive(GNRC_NETTYPE_UDP, port, pkt)) {
> +    if (!gnrc_netapi_dispatch_receive(GNRC_NETTYPE_UDP, port, udp)) {

What no! The listener is *supposed* to get the whole packet, not just the payload. And you are not sending the payload, you are sending the UDP header... at least when the meaning of the variables is still the same as it was.

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/3918/files#r40008306
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150921/73fe5398/attachment.html>


More information about the notifications mailing list