Skip to content

Commit

Permalink
ames: only print packet drop-count on drop (#665)
Browse files Browse the repository at this point in the history
Resolves #
  • Loading branch information
pkova authored Jul 1, 2024
2 parents 0d7be24 + 32fa09d commit 64eb9f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/vere/io/ames.c
Original file line number Diff line number Diff line change
Expand Up @@ -1659,6 +1659,7 @@ static void
_ames_cap_queue(u3_ames* sam_u)
{
u3_ovum* egg_u = sam_u->car_u.ext_u;
c3_d old_d = sam_u->sat_u.dop_d;

while ( egg_u && (QUEUE_MAX < sam_u->car_u.dep_w) ) {
u3_ovum* nex_u = egg_u->nex_u;
Expand All @@ -1675,8 +1676,9 @@ _ames_cap_queue(u3_ames* sam_u)
egg_u = nex_u;
}

if ( (sam_u->sat_u.dop_d && (0 == (sam_u->sat_u.dop_d % 1000)))
&& !(u3C.wag_w & u3o_verbose) )
if ( !(u3C.wag_w & u3o_verbose)
&& (old_d != sam_u->sat_u.dop_d)
&& !(sam_u->sat_u.dop_d % 1000) )
{
u3l_log("ames: packet dropped (%" PRIu64 " total)", sam_u->sat_u.dop_d);
}
Expand Down

0 comments on commit 64eb9f3

Please sign in to comment.