Merge pull request #664 from simonduq/rpl-link-metric-init-fix

RPL MRHOF: bypass EWMA when setting a parent's link metric for the first time
This commit is contained in:
Nicolas Tsiftes 2014-05-14 16:42:29 +02:00
commit 443bbd3948
5 changed files with 20 additions and 9 deletions

View file

@ -1083,8 +1083,8 @@ rpl_recalculate_ranks(void)
*/
p = nbr_table_head(rpl_parents);
while(p != NULL) {
if(p->dag != NULL && p->dag->instance && p->updated) {
p->updated = 0;
if(p->dag != NULL && p->dag->instance && (p->flags & RPL_PARENT_FLAG_UPDATED)) {
p->flags &= ~RPL_PARENT_FLAG_UPDATED;
PRINTF("RPL: rpl_process_parent_event recalculate_ranks\n");
if(!rpl_process_parent_event(p->dag->instance, p)) {
PRINTF("RPL: A parent was dropped\n");