[riot-notifications] [RIOT-OS/RIOT] gnrc_ipv6_ext_frag: check return value of msg_try_send() (#15526)

benpicco notifications at github.com
Mon Nov 30 15:45:09 CET 2020


@benpicco commented on this pull request.



> @@ -255,7 +255,12 @@ void gnrc_ipv6_ext_frag_send(gnrc_ipv6_ext_frag_send_t *snd_buf)
     /* tell gnrc_ipv6 to send the above prepared fragment */
     msg.type = GNRC_IPV6_EXT_FRAG_SEND;
     msg.content.ptr = to_send;
-    msg_try_send(&msg, gnrc_ipv6_pid);
+    if (msg_try_send(&msg, gnrc_ipv6_pid) <= 0) {
+        DEBUG("ipv6_ext_frag: Unable to send fragment, canceling fragmentation\n");
+        gnrc_pktbuf_release(to_send);
+        _snd_buf_free(snd_buf);
+        return;

can we propagate that error up the stack?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15526#pullrequestreview-540974456
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201130/5ebc07e5/attachment.htm>


More information about the notifications mailing list