]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
if root is unplugged and plugged back in, the network does not route to the root...
authorgnawali <gnawali>
Sat, 5 Dec 2009 02:59:49 +0000 (02:59 +0000)
committergnawali <gnawali>
Sat, 5 Dec 2009 02:59:49 +0000 (02:59 +0000)
tos/lib/net/4bitle/LinkEstimatorP.nc

index fab06407f1ec817633ae997316fa24f5ab95a5c8..fd4ddf302b38e3ea5b01b2833ecb7e43b0e30df0 100644 (file)
@@ -370,11 +370,6 @@ implementation {
     if (packetGap > 0) {
       NeighborTable[idx].failcnt += packetGap - 1;
     }
-    if (packetGap > MAX_PKT_GAP) {
-      NeighborTable[idx].failcnt = 0;
-      NeighborTable[idx].rcvcnt = 1;
-      NeighborTable[idx].inquality = 0;
-    }
 
     // The or with packetGap >= BLQ_PKT_WINDOW is needed in case
     // failcnt gets reset above
@@ -384,6 +379,11 @@ implementation {
       updateNeighborTableEst(NeighborTable[idx].ll_addr);
     }
 
+    if (packetGap > MAX_PKT_GAP) {
+      initNeighborIdx(idx, NeighborTable[idx].ll_addr);
+      NeighborTable[idx].lastseq = seq;
+      NeighborTable[idx].rcvcnt = 1;
+    }
   }