1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

demo: make handler more error tolerant

This commit is contained in:
Christian Mehlis 2014-01-18 01:16:38 +01:00
parent a4f1dc464a
commit f757de190f

View File

@ -26,15 +26,15 @@ void rpl_udp_init(char *str)
msg_t m;
uint8_t chan = RADIO_CHANNEL;
char command;
int res = sscanf(str, "init %c", &command);
if (res < 1) {
char *toc_str = strtok(str, " ");
toc_str = strtok(NULL, " ");
if (!toc_str) {
printf("Usage: init (r|n)\n");
printf("\tr\tinitialize as root\n");
printf("\tn\tinitialize as node router\n");
return;
}
char command = *toc_str;
uint8_t state;