Use RPL_DAG_LIFETIME when computing dag lifetime
This commit is contained in:
parent
c1f11cfaa9
commit
0fb597f2fa
|
@ -1542,7 +1542,7 @@ rpl_process_dio(uip_ipaddr_t *from, rpl_dio_t *dio)
|
|||
}
|
||||
|
||||
/* The DIO comes from a valid DAG, we can refresh its lifetime */
|
||||
dag->lifetime = (1UL << (instance->dio_intmin + instance->dio_intdoubl)) / 1000;
|
||||
dag->lifetime = (1UL << (instance->dio_intmin + instance->dio_intdoubl)) * RPL_DAG_LIFETIME / 1000;
|
||||
PRINTF("Set dag ");
|
||||
PRINT6ADDR(&dag->dag_id);
|
||||
PRINTF(" lifetime to %ld\n", dag->lifetime);
|
||||
|
|
|
@ -286,14 +286,14 @@
|
|||
GENERATE_MSG(0000000, "add-sink-2");
|
||||
GENERATE_MSG(0000000, "remove-sink-3");
|
||||

|
||||
GENERATE_MSG(2000000, "remove-sink-1");
|
||||
GENERATE_MSG(4000000, "remove-sink-2");
|
||||
GENERATE_MSG(4000000, "add-sink-3");
|
||||
GENERATE_MSG(6000000, "remove-sink-1");
|
||||
GENERATE_MSG(12000000, "remove-sink-2");
|
||||
GENERATE_MSG(12000000, "add-sink-3");
|
||||

|
||||
lostMsgs = 0;
|
||||
newDagOk = 0;
|
||||

|
||||
TIMEOUT(6000000, if(newDagOk == 2) { log.testOK(); } );
|
||||
TIMEOUT(18000000, if(newDagOk == 2) { log.testOK(); } );
|
||||

|
||||
lastMsg = -1;
|
||||
newSink = 0;
|
||||
|
|
|
@ -286,14 +286,14 @@
|
|||
GENERATE_MSG(0000000, "add-sink-2");
|
||||
GENERATE_MSG(0000000, "remove-sink-3");
|
||||

|
||||
GENERATE_MSG(2000000, "remove-sink-1");
|
||||
GENERATE_MSG(4000000, "remove-sink-2");
|
||||
GENERATE_MSG(4000000, "add-sink-3");
|
||||
GENERATE_MSG(6000000, "remove-sink-1");
|
||||
GENERATE_MSG(12000000, "remove-sink-2");
|
||||
GENERATE_MSG(12000000, "add-sink-3");
|
||||

|
||||
lostMsgs = 0;
|
||||
newDagOk = 0;
|
||||

|
||||
TIMEOUT(6000000, if(newDagOk == 2) { log.testOK(); } );
|
||||
TIMEOUT(18000000, if(newDagOk == 2) { log.testOK(); } );
|
||||

|
||||
lastMsg = -1;
|
||||
newSink = 0;
|
||||
|
|
Loading…
Reference in a new issue