@@ -537,6 +537,7 @@ void print_values(unsigned int y,unsigned int x,const char *if_name,t_iface_spee
537
537
values2str (1 ,stats ,full_stats ,multiplier ,buffer ,49 ),
538
538
((stats .errors .out || stats .errors .in ) && output_unit != ERRORS_OUT ) ? "error" : "dummy" );
539
539
fprintf (tmp_out_file ,"%s</span></td><tr>\n" ,values2str (2 ,stats ,full_stats ,multiplier ,buffer ,49 ));
540
+ fflush (tmp_out_file );
540
541
break ;
541
542
#endif
542
543
#ifdef CSV
@@ -565,7 +566,6 @@ void print_values(unsigned int y,unsigned int x,const char *if_name,t_iface_spee
565
566
#endif
566
567
fprintf (tmp_out_file ,"%.2f%c%.2f%c%.2f%c%llu%c%llu\n" ,(double )(stats_csv -> bytes .out * multiplier * 8 ),csv_char ,(double )(stats_csv -> bytes .in * multiplier * 8 ),
567
568
csv_char ,(double )((stats_csv -> bytes .out + stats_csv -> bytes .in )* multiplier * 8 ),csv_char ,stats_csv -> bytes .in * 8 ,csv_char ,stats_csv -> bytes .out * 8 );
568
- fflush (tmp_out_file );
569
569
} else {
570
570
stats_csv = & full_stats .sum ;
571
571
#if !NETSTAT_BSD_BYTES && !NETSTAT_NETBSD && NETSTAT
@@ -576,7 +576,6 @@ void print_values(unsigned int y,unsigned int x,const char *if_name,t_iface_spee
576
576
/* show packets and errors */
577
577
fprintf (tmp_out_file ,"%llu%c%llu%c%llu" ,stats_csv -> packets .out ,csv_char ,stats_csv -> packets .in ,csv_char ,(stats_csv -> packets .out + stats_csv -> packets .in ));
578
578
fprintf (tmp_out_file ,"%c%llu%c%llu\n" ,csv_char ,stats_csv -> errors .out ,csv_char ,stats_csv -> errors .in );
579
- fflush (tmp_out_file );
580
579
}
581
580
} else { /* MAX_OUT or AVG_OUT */
582
581
if (output_type == MAX_OUT )
@@ -600,8 +599,8 @@ void print_values(unsigned int y,unsigned int x,const char *if_name,t_iface_spee
600
599
/* show packets/s and errors/s */
601
600
fprintf (tmp_out_file ,"%.2Lf%c%.2Lf%c%.2Lf" ,stats_csv_d .packets .out ,csv_char ,stats_csv_d .packets .in ,csv_char ,stats_csv_d .packets .total );
602
601
fprintf (tmp_out_file ,"%c%.2Lf%c%.2Lf\n" ,csv_char ,stats_csv_d .errors .out ,csv_char ,stats_csv_d .errors .in );
603
- fflush (tmp_out_file );
604
602
}
603
+ fflush (tmp_out_file );
605
604
break ;
606
605
#endif
607
606
}
0 commit comments