On 2016-04-21 at 11:45:01 +0200, Vadim Kochan <[email protected]> wrote: > On Sun, Apr 17, 2016 at 8:31 PM, Vadim Kochan <[email protected]> wrote: > > Don't use refresh() & clear() as we draw entire screen > > and flows table will be filled with empty rows. > > > > Signed-off-by: Vadim Kochan <[email protected]> > > --- > > flowtop.c | 11 ++++------- > > 1 file changed, 4 insertions(+), 7 deletions(-) > > > > diff --git a/flowtop.c b/flowtop.c > > index 32459aa..3060917 100644 > > --- a/flowtop.c > > +++ b/flowtop.c > > @@ -1093,9 +1093,6 @@ static void draw_flows(WINDOW *screen, struct > > flow_list *fl, > > int skip = skip_lines; > > struct flow_entry *n; > > > > - wclear(screen); > > - clear(); > > - > > rcu_read_lock(); > > > > n = rcu_dereference(fl->head); > > @@ -1124,6 +1121,7 @@ static void draw_flows(WINDOW *screen, struct > > flow_list *fl, > > line += row_width; > > } > > > > + mvwprintw(screen, 1, 0, "%*s", COLS - 1, " "); > > mvwprintw(screen, 1, 2, "Kernel netfilter flows(%u) for ", flows); > > > > if (what & INCLUDE_IPV4) > > @@ -1254,6 +1252,7 @@ static void flows_table_init(struct ui_table *tbl) > > ui_table_init(tbl); > > > > ui_table_pos_set(tbl, 3, 0); > > + ui_table_height_set(tbl, LINES - 3); > > > > ui_table_col_add(tbl, TBL_FLOW_PROCESS, "PROCESS", 13); > > ui_table_col_add(tbl, TBL_FLOW_PID, "PID", 7); > > @@ -1356,6 +1355,8 @@ static void presenter(void) > > break; > > } > > > > + draw_header(screen); > > + > > if (!redraw_flows) > > redraw_flows = time_passed_us >= 1 * USEC_PER_SEC; > > > > @@ -1369,15 +1370,11 @@ static void presenter(void) > > time_passed_us += time_sleep_us; > > } > > > > - draw_header(screen); > > - > > if (show_help) > > draw_help(screen); > > > > draw_footer(screen); > > > > - wrefresh(screen); > > - refresh(); > > usleep(time_sleep_us); > > } > > rcu_unregister_thread(); > > -- > > 2.6.3 > > > > Sorry, I just tested on another terminal color settings and I checked > that at least 1 clear() is needed on init. > > I will fix it and re-send series, or you can ignore last 2 patches.
Sorry, I only had time to review patches 1-5 so far. These look good and I'll apply them. I'll wait for the revised series until reviewing the other patches. -- You received this message because you are subscribed to the Google Groups "netsniff-ng" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
