Orchestra: fix bug in new_time_source
This commit is contained in:
parent
287b4767e3
commit
7e8d042609
@ -176,13 +176,14 @@ static void
|
||||
new_time_source(const struct tsch_neighbor *old, const struct tsch_neighbor *new)
|
||||
{
|
||||
if(new != old) {
|
||||
const linkaddr_t *old_addr = old != NULL ? &old->addr : NULL;
|
||||
const linkaddr_t *new_addr = new != NULL ? &new->addr : NULL;
|
||||
if(new_addr != NULL) {
|
||||
linkaddr_copy(&orchestra_parent_linkaddr, new_addr);
|
||||
} else {
|
||||
linkaddr_copy(&orchestra_parent_linkaddr, &linkaddr_null);
|
||||
}
|
||||
remove_uc_link(new_addr);
|
||||
remove_uc_link(old_addr);
|
||||
add_uc_link(new_addr);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user