summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaul <paul>2005-11-03 12:52:18 +0000
committerpaul <paul>2005-11-03 12:52:18 +0000
commit412008568bddbc9475eafba224d1a1703d6cca97 (patch)
tree8f9fc89b99f657af060904ae353ba07b9375321f
parent0752ef0b2e9bbf6c7ab20ed0fe87840b3bd1b7f4 (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().
-rw-r--r--bgpd/ChangeLog6
-rw-r--r--bgpd/bgp_damp.c9
2 files changed, 9 insertions, 6 deletions
diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog
index d83c3458..eadd07f1 100644
--- a/bgpd/ChangeLog
+++ b/bgpd/ChangeLog
@@ -1,3 +1,9 @@
+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().
+
2005-10-01 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* bgp_vty.c: (bgp_config_write_redistribute) Use new library function
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. */