diff --git a/core/net/rime/collect-neighbor.c b/core/net/rime/collect-neighbor.c index 06d61a284..7e91ce855 100644 --- a/core/net/rime/collect-neighbor.c +++ b/core/net/rime/collect-neighbor.c @@ -33,7 +33,7 @@ * * This file is part of the Contiki operating system. * - * $Id: collect-neighbor.c,v 1.8 2010/10/11 23:38:46 adamdunkels Exp $ + * $Id: collect-neighbor.c,v 1.9 2011/01/09 21:20:05 adamdunkels Exp $ */ /** @@ -63,7 +63,7 @@ MEMB(collect_neighbors_mem, struct collect_neighbor, MAX_COLLECT_NEIGHBORS); -#define MAX_AGE 60 +#define MAX_AGE 180 #define MAX_LE_AGE 10 #define PERIODIC_INTERVAL CLOCK_SECOND * 60 @@ -98,6 +98,7 @@ periodic(void *ptr) n->le_age = 0; } if(n->age == MAX_AGE) { + memb_free(&collect_neighbors_mem, n); list_remove(neighbor_list->list, n); n = list_head(neighbor_list->list); }