diff options
author | hasso <hasso> | 2003-12-23 11:51:08 +0000 |
---|---|---|
committer | hasso <hasso> | 2003-12-23 11:51:08 +0000 |
commit | 059feb1c7e42ca29dede49b00c1073baf68b19b9 (patch) | |
tree | f784c66644dfb367b2c7237960f262a85cb5ad57 /isisd/isis_adjacency.c | |
parent | f8a631db73dcac5fe49305ff0c420617d97e102d (diff) | |
download | quagga-059feb1c7e42ca29dede49b00c1073baf68b19b9.tar.bz2 quagga-059feb1c7e42ca29dede49b00c1073baf68b19b9.tar.xz |
Some fixes to isisd done by me and Cougar in the spring of 2003. See
changelog for details.
Diffstat (limited to 'isisd/isis_adjacency.c')
-rw-r--r-- | isisd/isis_adjacency.c | 15 |
1 files changed, 11 insertions, 4 deletions
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); |