diff options
author | paul <paul> | 2005-11-03 12:52:18 +0000 |
---|---|---|
committer | paul <paul> | 2005-11-03 12:52:18 +0000 |
commit | 412008568bddbc9475eafba224d1a1703d6cca97 (patch) | |
tree | 8f9fc89b99f657af060904ae353ba07b9375321f /bgpd/bgp_damp.c | |
parent | 0752ef0b2e9bbf6c7ab20ed0fe87840b3bd1b7f4 (diff) |
2005-11-03 Paul Jakma <paul.jakma@sun.com>
* bgp_damp.c: (bgp_reuse_timer) struct bgp can be retrieved via
the struct bgp_damp_info, no need to guess by using
bgp_get_default().
Diffstat (limited to 'bgpd/bgp_damp.c')
-rw-r--r-- | bgpd/bgp_damp.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/bgpd/bgp_damp.c b/bgpd/bgp_damp.c index 93f1995f..a2163a4f 100644 --- a/bgpd/bgp_damp.c +++ b/bgpd/bgp_damp.c @@ -112,16 +112,11 @@ bgp_reuse_timer (struct thread *t) struct bgp_damp_info *bdi; struct bgp_damp_info *next; time_t t_now, t_diff; - struct bgp *bgp; - + damp->t_reuse = NULL; damp->t_reuse = thread_add_timer (master, bgp_reuse_timer, NULL, DELTA_REUSE); - bgp = bgp_get_default (); - if (! bgp) - return 0; - t_now = time (NULL); /* 1. save a pointer to the current zeroth queue head and zero the @@ -136,6 +131,8 @@ bgp_reuse_timer (struct thread *t) /* 3. if ( the saved list head pointer is non-empty ) */ for (; bdi; bdi = next) { + struct bgp *bgp = bdi->binfo->peer->bgp; + next = bdi->next; /* Set t-diff = t-now - t-updated. */ |