Author: adrian.chadd
Date: Mon Feb 23 14:14:54 2009
New Revision: 13855

Modified:
    playpen/LUSCA_HEAD_bgp/libsqbgp/bgp_rib.c

Log:
Add in debugging to track when the rib flush gets called; and just call the  
external facing "destroy" routine rather than trying to clean and reuse the  
radix tree.



Modified: playpen/LUSCA_HEAD_bgp/libsqbgp/bgp_rib.c
==============================================================================
--- playpen/LUSCA_HEAD_bgp/libsqbgp/bgp_rib.c   (original)
+++ playpen/LUSCA_HEAD_bgp/libsqbgp/bgp_rib.c   Mon Feb 23 14:14:54 2009
@@ -85,20 +85,25 @@
  void
  bgp_rib_init(bgp_rib_head_t *head)
  {
+       debug(85, 1) ("bgp_rib_init: %p: called\n", head);
        head->rh = New_Radix();
  }

  void
  bgp_rib_destroy(bgp_rib_head_t *head)
  {
-       Destroy_Radix(head->rh, bgp_rib_asn_free, NULL);
-       head->num_prefixes = 0;
+       debug(85, 1) ("bgp_rib_destroy: %p: called\n", head);
+       bzero(head, sizeof(*head));
+       
  }

  void
  bgp_rib_clean(bgp_rib_head_t *head)
  {
-       Clear_Radix(head->rh, bgp_rib_asn_free, NULL);
+       debug(85, 1) ("bgp_rib_clean: %p: called\n", head);
+       //Clear_Radix(head->rh, bgp_rib_asn_free, NULL);
+       Destroy_Radix(head->rh, bgp_rib_asn_free, NULL);
+       head->rh = New_Radix();
        head->num_prefixes = 0;
  }


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to