@@ -159,7 +159,7 @@ implementation {
159
159
uint8_t routingTableActive;
160
160
161
161
/* statistics */
162
- uint32_t parentChanges;
162
+ // uint32_t parentChanges;
163
163
/* end statistics */
164
164
165
165
// forward declarations
@@ -213,7 +213,7 @@ implementation {
213
213
command error_t Init.init () {
214
214
radioOn = FALSE ;
215
215
running = FALSE ;
216
- parentChanges = 0 ;
216
+ // parentChanges = 0;
217
217
state_is_root = 0 ;
218
218
routeInfoInit (&routeInfo);
219
219
routingTableInit ();
@@ -348,7 +348,7 @@ implementation {
348
348
// since the linkMetric may change, we will compose whenever
349
349
// we need it: i. when choosing a parent (here);
350
350
// ii. when choosing a next hop
351
- parentChanges++;
351
+ // parentChanges++;
352
352
353
353
dbg (" TreeRouting" ," Changed parent. from %d to %d \n " , routeInfo.parent , best->neighbor );
354
354
call CollectionDebug.logEventDbg (NET_C_TREE_NEW_PARENT, best->neighbor , best->info .etx , minEtx);
@@ -368,17 +368,19 @@ implementation {
368
368
/* Finally, tell people what happened: */
369
369
/* We can only loose a route to a parent if it has been evicted. If it hasn't
370
370
* been just evicted then we already did not have a route */
371
- if (justEvicted && routeInfo.parent == INVALID_ADDR)
371
+ if (justEvicted && routeInfo.parent == INVALID_ADDR) {
372
372
signal Routing.noRoute ();
373
+ }
373
374
/* On the other hand, if we didn't have a parent (no currentEtx) and now we
374
375
* do, then we signal route found. The exception is if we just evicted the
375
376
* parent and immediately found a replacement route: we don't signal in this
376
377
* case */
377
378
else if (!justEvicted &&
378
379
currentEtx == MAX_METRIC &&
379
- minEtx != MAX_METRIC)
380
+ minEtx != MAX_METRIC) {
380
381
signal Routing.routeFound ();
381
- justEvicted = FALSE ;
382
+ }
383
+ justEvicted = FALSE ;
382
384
}
383
385
384
386
0 commit comments