Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/core/msg.c b/core/msg.c
index a46875f16e..dbb6b6b6bf 100644
--- a/core/msg.c
+++ b/core/msg.c
@@ -366,7 +366,7 @@ static int _msg_receive(msg_t *m, int block)
if (sender_prio < THREAD_PRIORITY_IDLE) {
sched_switch(sender_prio);
}
- return 1;
+ return 2;
}
DEBUG("This should have never been reached!\n");
diff --git a/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c b/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c
index feb2e8f10f..a62887c250 100644
--- a/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c
+++ b/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c
@@ -180,7 +180,8 @@ static void *_event_loop(void *args)
/* start event loop */
while (1) {
DEBUG("ipv6: waiting for incoming message.\n");
- msg_receive(&msg);
+ memset(&msg, 0, sizeof(msg));
+ int res = msg_receive(&msg);
switch (msg.type) {
case GNRC_NETAPI_MSG_TYPE_RCV:
@@ -220,6 +221,7 @@ static void *_event_loop(void *args)
gnrc_ipv6_nib_handle_timer_event(msg.content.ptr, msg.type);
break;
default:
+ printf("ipv6: unknown message type 0x%04x, res=%i\n", msg.type, res);
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment