Allocate the default_instance pointer in rpl-dag.c instead of the

header file to fix "multiple definition of `default_instance'" errors.
This commit is contained in:
Mariano Alvira 2011-12-09 08:36:23 -05:00
parent 1086299f25
commit c9ac19b919
2 changed files with 2 additions and 1 deletions

View File

@ -96,6 +96,7 @@ MEMB(parent_memb, struct rpl_parent, RPL_MAX_PARENTS_PER_DODAG*RPL_MAX_INSTANCES
/************************************************************************/
/* Allocate instance table. */
rpl_instance_t instance_table[RPL_MAX_INSTANCES];
rpl_instance_t *default_instance;
/************************************************************************/
/* Remove DAG parents with a rank that is at least the same as minimum_rank. */

View File

@ -253,7 +253,7 @@ extern rpl_stats_t rpl_stats;
/*---------------------------------------------------------------------------*/
/* Instances */
extern rpl_instance_t instance_table[];
rpl_instance_t *default_instance;
extern rpl_instance_t *default_instance;
/* ICMPv6 functions for RPL. */
void dis_output(uip_ipaddr_t *addr);