Skip to content

Commit

Permalink
Move address initialization to after proce_init. Something in that no…
Browse files Browse the repository at this point in the history
…w wiping the address array.
  • Loading branch information
dak664 committed Feb 11, 2012
1 parent 0327fe3 commit 20a5c79
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions platform/minimal-net/contiki-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
*
* This file is part of the Contiki OS
*
* $Id: contiki-main.c,v 1.25 2010/10/19 18:29:05 adamdunkels Exp $
*
*/

Expand Down Expand Up @@ -222,6 +221,9 @@ main(void)
printf("RPL enabled\n");
#endif

procinit_init();
autostart_start(autostart_processes);

/* Set default IP addresses if not specified */
#if !UIP_CONF_IPV6
{
Expand Down Expand Up @@ -274,7 +276,17 @@ main(void)
}
#endif /* !UIP_CONF_IPV6_RPL */

#if !RPL_BORDER_ROUTER /* Border router process prints addresses later */
#endif /* !UIP_CONF_IPV6 */

// procinit_init();
// autostart_start(autostart_processes);

/* Make standard output unbuffered. */
setvbuf(stdout, (char *)NULL, _IONBF, 0);

printf("\n*******%s online*******\n",CONTIKI_VERSION_STRING);

#if UIP_CONF_IPV6 && !RPL_BORDER_ROUTER /* Border router process prints addresses later */
{
uint8_t i;
for(i = 0; i < UIP_DS6_ADDR_NB; i++) {
Expand All @@ -285,16 +297,7 @@ main(void)
}
}
}
#endif /* !RPL_BORDER_ROUTER */
#endif /* !UIP_CONF_IPV6 */

procinit_init();
autostart_start(autostart_processes);

/* Make standard output unbuffered. */
setvbuf(stdout, (char *)NULL, _IONBF, 0);

printf("\n*******%s online*******\n",CONTIKI_VERSION_STRING);
#endif

while(1) {
fd_set fds;
Expand Down

0 comments on commit 20a5c79

Please sign in to comment.