Reduced the value of the max depth, so that a count-to-infinity loop will not count too long before hitting the maximum value. This is important when a network loses its sink, so that packets are not forwarded around the network for ever.

This commit is contained in:
adamdunkels 2010-12-16 22:46:34 +00:00
parent 19e930e6f2
commit 10fb99a89d

View file

@ -47,7 +47,7 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
* $Id: collect.h,v 1.24 2010/11/06 14:32:10 adamdunkels Exp $ * $Id: collect.h,v 1.25 2010/12/16 22:46:34 adamdunkels Exp $
*/ */
/** /**
@ -109,6 +109,8 @@ struct collect_conn {
uint8_t sending, transmissions, max_rexmits; uint8_t sending, transmissions, max_rexmits;
uint8_t eseqno; uint8_t eseqno;
uint8_t is_router; uint8_t is_router;
clock_time_t send_time;
}; };
enum { enum {
@ -132,7 +134,7 @@ void collect_set_keepalive(struct collect_conn *c, clock_time_t period);
void collect_print_stats(void); void collect_print_stats(void);
#define COLLECT_MAX_DEPTH ((1 << 12) - 1) #define COLLECT_MAX_DEPTH (COLLECT_LINK_ESTIMATE_UNIT * 32 - 1)
#endif /* __COLLECT_H__ */ #endif /* __COLLECT_H__ */
/** @} */ /** @} */