mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-27 15:31:17 +01:00
tests/gnrc_sock_dns: add a message queue
Without it I get the following error when I try to use ping6
!!!! gnrc_netreg: initialize message queue of thread 2 using msg_init_queue() !!!!
Stack Pointer: 0x22ef
*** RIOT kernel panic:
FAILED ASSERTION.
So copy the message queue from examples/gnrc_networking
This commit is contained in:
parent
f5a5c5dd2c
commit
5256f061dd
@ -26,6 +26,9 @@
|
||||
#include "net/sock/dns.h"
|
||||
#include "shell.h"
|
||||
|
||||
#define MAIN_QUEUE_SIZE (8)
|
||||
static msg_t _main_msg_queue[MAIN_QUEUE_SIZE];
|
||||
|
||||
static int _dns(int argc, char **argv);
|
||||
|
||||
static const shell_command_t _shell_commands[] = {
|
||||
@ -102,6 +105,10 @@ static int _dns(int argc, char **argv)
|
||||
|
||||
int main(void)
|
||||
{
|
||||
/* we need a message queue for the thread running the shell in order to
|
||||
* receive potentially fast incoming networking packets */
|
||||
msg_init_queue(_main_msg_queue, MAIN_QUEUE_SIZE);
|
||||
|
||||
/* start shell */
|
||||
shell_run(_shell_commands, _shell_buffer, sizeof(_shell_buffer));
|
||||
return 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user