From 4e2e242d708a946363313a7320e5619255870396 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 24 Jan 2011 15:40:30 +0100 Subject: [PATCH] mtp: Show blocked links as blocked in the vty stat --- src/vty_interface.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/vty_interface.c b/src/vty_interface.c index d2a714e..91b9d5c 100644 --- a/src/vty_interface.c +++ b/src/vty_interface.c @@ -330,10 +330,14 @@ static void dump_state(struct vty *vty, const char *name, struct mtp_link_set *s VTY_NEWLINE); llist_for_each_entry(link, &set->links, entry) { - vty_out(vty, " Link %d is %s.%s", - link->link_no, - link->available == 0 ? "not available" : "available", - VTY_NEWLINE); + if (link->blocked) + vty_out(vty, " Link %d is blocked.%s", + link->link_no, VTY_NEWLINE); + else + vty_out(vty, " Link %d is %s.%s", + link->link_no, + link->available == 0 ? "not available" : "available", + VTY_NEWLINE); } }