[master] ddff9a2 Show a disconnected message in varnishstat curses when not having an open VSM connection
Martin Blix Grydeland
martin at varnish-cache.org
Tue Oct 1 14:48:19 CEST 2013
commit ddff9a26bdf5a49e68761a700fb806b02069a61a
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date: Tue Oct 1 10:09:26 2013 +0200
Show a disconnected message in varnishstat curses when not having an
open VSM connection
diff --git a/bin/varnishstat/varnishstat_curses.c b/bin/varnishstat/varnishstat_curses.c
index ff69c0e..cfffac5 100644
--- a/bin/varnishstat/varnishstat_curses.c
+++ b/bin/varnishstat/varnishstat_curses.c
@@ -497,6 +497,7 @@ draw_status(void)
{
time_t up_mgt = 0;
time_t up_chld = 0;
+ static const char discon[] = "*** DISCONNECTED ***";
AN(w_status);
@@ -513,6 +514,9 @@ draw_status(void)
up_chld / 86400, (up_chld % 86400) / 3600, (up_chld % 3600) / 60,
up_chld % 60);
+ if (VSC_C_mgt == NULL)
+ mvwprintw(w_status, 0, COLS - strlen(discon), discon);
+
wnoutrefresh(w_status);
}
More information about the varnish-commit
mailing list