From 2097cd8a7a1322b2853f1b9cbbe7f39c436f553e Mon Sep 17 00:00:00 2001 From: hasso Date: Tue, 23 Dec 2003 11:51:08 +0000 Subject: Some fixes to isisd done by me and Cougar in the spring of 2003. See changelog for details. --- isisd/isis_adjacency.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'isisd/isis_adjacency.c') diff --git a/isisd/isis_adjacency.c b/isisd/isis_adjacency.c index 8079bd17..de747692 100644 --- a/isisd/isis_adjacency.c +++ b/isisd/isis_adjacency.c @@ -146,7 +146,7 @@ isis_delete_adj (struct isis_adjacency *adj, struct list *adjdb) if (adj2 == adj) break; } - listnode_delete (adjdb, node); + listnode_delete (adjdb, adj); } if (adj->ipv4_addrs) @@ -336,7 +336,10 @@ isis_adj_print_vty2 (struct isis_adjacency *adj, struct vty *vty, char detail) vty_out (vty, "%-3u", adj->level); /* level */ vty_out (vty, "%-13s", adj_state2string (adj->adj_state)); now = time (NULL); - vty_out (vty, "%-9lu", adj->last_upd + adj->hold_time - now); + if (adj->last_upd) + vty_out (vty, "%-9lu", adj->last_upd + adj->hold_time - now); + else + vty_out (vty, "- "); vty_out (vty, "%-10s", snpa_print (adj->snpa)); vty_out (vty, "%s", VTY_NEWLINE); } @@ -352,8 +355,12 @@ isis_adj_print_vty2 (struct isis_adjacency *adj, struct vty *vty, char detail) vty_out (vty, ", Level: %u", adj->level); /* level */ vty_out (vty, ", State: %s", adj_state2string (adj->adj_state)); now = time (NULL); - vty_out (vty, ", Expires in %s", - time2string (adj->last_upd + adj->hold_time - now)); + if (adj->last_upd) + vty_out (vty, ", Expires in %s", + time2string (adj->last_upd + adj->hold_time - now)); + else + vty_out (vty, ", Expires in %s", + time2string (adj->hold_time)); vty_out (vty, "%s Adjacency flaps: %u", VTY_NEWLINE, adj->flaps); -- cgit v1.2.1