Ensure that the objective function's reset function is called at least once. This will enable the objective function to initialize itself during run-time.
This commit is contained in:
parent
7f4d3e3d7b
commit
afbb82030e
2 changed files with 5 additions and 0 deletions
|
@ -308,6 +308,8 @@ rpl_init(void)
|
||||||
#if RPL_CONF_STATS
|
#if RPL_CONF_STATS
|
||||||
memset(&rpl_stats, 0, sizeof(rpl_stats));
|
memset(&rpl_stats, 0, sizeof(rpl_stats));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
RPL_OF.reset(NULL);
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
#endif /* UIP_CONF_IPV6 */
|
#endif /* UIP_CONF_IPV6 */
|
||||||
|
|
|
@ -189,6 +189,9 @@ struct rpl_of {
|
||||||
rpl_ocp_t ocp;
|
rpl_ocp_t ocp;
|
||||||
};
|
};
|
||||||
typedef struct rpl_of rpl_of_t;
|
typedef struct rpl_of rpl_of_t;
|
||||||
|
|
||||||
|
/* Declare the selected objective function. */
|
||||||
|
extern rpl_of_t RPL_OF;
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/* Instance */
|
/* Instance */
|
||||||
struct rpl_instance {
|
struct rpl_instance {
|
||||||
|
|
Loading…
Add table
Reference in a new issue