Merge pull request #895 from simonduq/rpl-single-dag
Do not use rpl_add_dag when RPL is used with a single dag per instance
This commit is contained in:
commit
f9e5e24cf4
1 changed files with 7 additions and 0 deletions
|
@ -972,6 +972,7 @@ rpl_join_instance(uip_ipaddr_t *from, rpl_dio_t *dio)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if RPL_MAX_DAG_PER_INSTANCE > 1
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
rpl_add_dag(uip_ipaddr_t *from, rpl_dio_t *dio)
|
rpl_add_dag(uip_ipaddr_t *from, rpl_dio_t *dio)
|
||||||
|
@ -1051,6 +1052,7 @@ rpl_add_dag(uip_ipaddr_t *from, rpl_dio_t *dio)
|
||||||
rpl_process_parent_event(instance, p);
|
rpl_process_parent_event(instance, p);
|
||||||
p->dtsn = dio->dtsn;
|
p->dtsn = dio->dtsn;
|
||||||
}
|
}
|
||||||
|
#endif /* RPL_MAX_DAG_PER_INSTANCE > 1 */
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
|
@ -1246,9 +1248,14 @@ rpl_process_dio(uip_ipaddr_t *from, rpl_dio_t *dio)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(dag == NULL) {
|
if(dag == NULL) {
|
||||||
|
#if RPL_MAX_DAG_PER_INSTANCE > 1
|
||||||
PRINTF("RPL: Adding new DAG to known instance.\n");
|
PRINTF("RPL: Adding new DAG to known instance.\n");
|
||||||
rpl_add_dag(from, dio);
|
rpl_add_dag(from, dio);
|
||||||
return;
|
return;
|
||||||
|
#else /* RPL_MAX_DAG_PER_INSTANCE > 1 */
|
||||||
|
PRINTF("RPL: Only one instance supported.\n");
|
||||||
|
return;
|
||||||
|
#endif /* RPL_MAX_DAG_PER_INSTANCE > 1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue