Created
January 28, 2019 10:25
-
-
Save kaspar030/92fa81d1ae60d5f134806027829ea736 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/msg.c b/core/msg.c | |
index a46875f16e..fc92bf81fc 100644 | |
--- a/core/msg.c | |
+++ b/core/msg.c | |
@@ -330,12 +330,12 @@ static int _msg_receive(msg_t *m, int block) | |
thread_yield_higher(); | |
/* sender copied message */ | |
+ return 1; | |
} | |
else { | |
irq_restore(state); | |
+ return 2; | |
} | |
- | |
- return 1; | |
} | |
else { | |
DEBUG("_msg_receive: %" PRIkernel_pid ": _msg_receive(): Waking up waiting thread.\n", | |
@@ -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 3; | |
} | |
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