diff options
author | paulo <paul@bayleaf.org.uk> | 2010-01-20 17:06:59 +0000 |
---|---|---|
committer | paulo <paul@bayleaf.org.uk> | 2010-01-20 17:06:59 +0000 |
commit | 8edeadc6aa38857fff1a5d94b8d35962ddaeaab4 (patch) | |
tree | 7f2c063f939525d19fd202a612c8f64d723a6fac | |
parent | 45a67b197f4c9ed42179672f8b929a59faf11145 (diff) | |
download | quagga-8edeadc6aa38857fff1a5d94b8d35962ddaeaab4.tar.bz2 quagga-8edeadc6aa38857fff1a5d94b8d35962ddaeaab4.tar.xz |
Fix debuggery in qtimers. Check NULL notify pointer in bgp_vty
-rw-r--r-- | bgpd/bgp_vty.c | 2 | ||||
-rw-r--r-- | lib/qtimers.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index dfd9c316..c679d93d 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -7610,7 +7610,7 @@ bgp_show_peer (struct vty *vty, struct peer *p) p->t_write ? "on" : "off", VTY_NEWLINE); - if (p->notify->code == BGP_NOTIFY_OPEN_ERR + if (p->notify != NULL && p->notify->code == BGP_NOTIFY_OPEN_ERR && p->notify->subcode == BGP_NOTIFY_OPEN_UNSUP_CAPBL) bgp_capability_vty_out (vty, p); diff --git a/lib/qtimers.c b/lib/qtimers.c index a5d0e27b..6c6c1406 100644 --- a/lib/qtimers.c +++ b/lib/qtimers.c @@ -333,7 +333,6 @@ qtimer_set(qtimer qtr, qtime_mono_t when, qtimer_action* action) heap_push_item(&qtp->timers, qtr) ; /* add to heap */ assert(qtp == qtr->pile); - qtimer_pile_verify(qtp) ; /* TODO: remove after debuggery */ qtr->state = qtr_state_active ; /* overrides any unset pending */ @@ -341,6 +340,8 @@ qtimer_set(qtimer qtr, qtime_mono_t when, qtimer_action* action) qtr->action = action ; else dassert(qtr->action != NULL) ; + + qtimer_pile_verify(qtp) ; /* TODO: remove after debuggery */ } ; /* Unset given timer |