]> git.puffer.fish Git - matthieu/frr.git/commitdiff
2005-11-03 Paul Jakma <paul.jakma@sun.com>
authorpaul <paul>
Thu, 3 Nov 2005 12:52:18 +0000 (12:52 +0000)
committerpaul <paul>
Thu, 3 Nov 2005 12:52:18 +0000 (12:52 +0000)
* 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().

bgpd/ChangeLog
bgpd/bgp_damp.c

index d83c34586d10755a63b01d5dda923d68c1f485e7..eadd07f1dbecb509259433394b4ce9b095099580 100644 (file)
@@ -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
index 93f1995fe3e8f4631570ae07423f580397fca371..a2163a4f2650557b282c7e4e8dfa1ead4bb232fe 100644 (file)
@@ -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.  */