Cancel pending timeout before scheduling a new one. This fixes

item leak, I've introduced with previous change.

Approved by:	julian (mentor)
This commit is contained in:
Gleb Smirnoff 2004-11-19 20:23:46 +00:00
parent bb50f99e30
commit 92947dc698

View File

@ -111,6 +111,7 @@ typedef struct callout sscop_timer_t;
ng_untimeout(&(S)->t_##T, (S)->aarg); \
} while (0)
#define TIMER_RESTART(S, T) do { \
TIMER_STOP(S, T); \
ng_timeout(&(S)->t_##T, (S)->aarg, NULL, \
hz * (S)->timer##T / 1000, T##_func, (S), 0); \
} while (0)