diff options
author | Paul Jakma <paul.jakma@sun.com> | 2006-09-14 05:02:02 +0200 |
---|---|---|
committer | Paul Jakma <paul.jakma@sun.com> | 2006-09-14 05:02:02 +0200 |
commit | 9fde6624fc480995449d8243fe85602d89927eb6 (patch) | |
tree | 6591e476329ec88bd9ba5fcc008c626d32b3fdb5 /bgpd/bgpd.c | |
parent | [bgpd] Fix 0.99 shutdown regression, introduce Clearing and Deleted states (diff) | |
download | frr-9fde6624fc480995449d8243fe85602d89927eb6.tar.xz frr-9fde6624fc480995449d8243fe85602d89927eb6.zip |
[bgpd] simplify peer refcounts, squash slow peer leak
2006-09-14 Paul Jakma <paul.jakma@sun.com>
* (general) fix the peer refcount issue exposed by previous, by
just removing refcounting of peer threads, which is mostly
senseless as they're references leading from struct peer,
which peer_free cancels anyway. No need to muck around..
* bgp_fsm.h: Just remove the refcounting from the various
TIMER/READ/WRITE/EVENT ON/OFF/ADD macros.
* bgp_fsm.c: (bgp_stop) use BGP_EVENT_FLUSH, no refcounts attached
to events anymore.
(bgp_event) remove peer_unlock, events not refcounted.
* bgpd.c: (peer_free) flush events before free.
Diffstat (limited to '')
-rw-r--r-- | bgpd/bgpd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 733b33a6a..89f82628a 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -695,6 +695,7 @@ peer_free (struct peer *peer) bgp_timer_set (peer); BGP_READ_OFF (peer->t_read); BGP_WRITE_OFF (peer->t_write); + BGP_EVENT_FLUSH (peer); if (peer->desc) XFREE (MTYPE_PEER_DESC, peer->desc); |