Browse Source

examples: use global gnrc_pktdump_pid

pr/gpio
Cenk Gündoğan 7 years ago
parent
commit
bf1af5953f
  1. 2
      examples/default/main.c
  2. 2
      examples/gnrc_networking/udp.c

2
examples/default/main.c

@ -55,7 +55,7 @@ int main(void)
#ifdef MODULE_NETIF
gnrc_netreg_entry_t dump;
dump.pid = gnrc_pktdump_getpid();
dump.pid = gnrc_pktdump_pid;
dump.demux_ctx = GNRC_NETREG_DEMUX_CTX_ALL;
gnrc_netreg_register(GNRC_NETTYPE_UNDEF, &dump);
#endif

2
examples/gnrc_networking/udp.c

@ -103,7 +103,7 @@ static void start_server(char *port_str)
return;
}
/* start server (which means registering pktdump for the chosen port) */
server.pid = gnrc_pktdump_getpid();
server.pid = gnrc_pktdump_pid;
server.demux_ctx = (uint32_t)port;
gnrc_netreg_register(GNRC_NETTYPE_UDP, &server);
printf("Success: started UDP server on port %" PRIu16 "\n", port);

Loading…
Cancel
Save