diff options
author | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2016-12-14 14:44:23 +1100 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2016-12-20 16:40:22 +1100 |
commit | 75c97cfd449b2bac8e61af1017a83bdf43f5e8fe (patch) | |
tree | cc6b4a0bf23e58cb1cd737a3cefdf7c54c4f7566 /ui/ncurses/nc-cui.c | |
parent | 6a065198be213092c67071ee77eccf3e493a4cba (diff) | |
download | talos-petitboot-75c97cfd449b2bac8e61af1017a83bdf43f5e8fe.tar.gz talos-petitboot-75c97cfd449b2bac8e61af1017a83bdf43f5e8fe.zip |
discover: Maintain a backlog of status updates
Add status updates to a persistent list in the discover_server struct,
and send each client the backlog on connect. This avoids clients missing
useful messages from early init. Clients will only show this in the
backlog screen to avoid flooding the client's status line.
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'ui/ncurses/nc-cui.c')
-rw-r--r-- | ui/ncurses/nc-cui.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/ncurses/nc-cui.c b/ui/ncurses/nc-cui.c index 93b2e43..b4f74a7 100644 --- a/ui/ncurses/nc-cui.c +++ b/ui/ncurses/nc-cui.c @@ -714,7 +714,9 @@ static void cui_update_status(struct status *status, void *arg) statuslog_append_steal(cui, cui->statuslog, status); - nc_scr_status_printf(cui->current, "%s", status->message); + /* Ignore status messages from the backlog */ + if (!status->backlog) + nc_scr_status_printf(cui->current, "%s", status->message); } static void cui_update_mm_title(struct cui *cui) |