diff options
author | Andreas Steffen <andreas.steffen@strongswan.org> | 2013-03-22 21:13:59 +0100 |
---|---|---|
committer | Andreas Steffen <andreas.steffen@strongswan.org> | 2013-03-22 21:14:04 +0100 |
commit | 9fa9f68d8d5cd2c51a8693629a4d475a22a19e04 (patch) | |
tree | 260ba1f3f4578a2c49e3b5837db9db7a19e28219 /src/libcharon/plugins | |
parent | 48d82a7dc77b4fa004684773aca05944682c1887 (diff) | |
download | strongswan-9fa9f68d8d5cd2c51a8693629a4d475a22a19e04.tar.bz2 strongswan-9fa9f68d8d5cd2c51a8693629a4d475a22a19e04.tar.xz |
enforce singular of packets
Diffstat (limited to 'src/libcharon/plugins')
-rw-r--r-- | src/libcharon/plugins/stroke/stroke_list.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libcharon/plugins/stroke/stroke_list.c b/src/libcharon/plugins/stroke/stroke_list.c index 7f368148c..a2e1c80a5 100644 --- a/src/libcharon/plugins/stroke/stroke_list.c +++ b/src/libcharon/plugins/stroke/stroke_list.c @@ -278,8 +278,9 @@ static void log_child_sa(FILE *out, child_sa_t *child_sa, bool all) fprintf(out, ", %" PRIu64 " bytes_i", bytes_in); if (use_in) { - fprintf(out, " (%" PRIu64 " pkts, %" PRIu64 "s ago)", - packets_in, (u_int64_t)(now - use_in)); + fprintf(out, " (%" PRIu64 " pkt%s, %" PRIu64 "s ago)", + packets_in, (packets_in == 1) ? "": "s", + (u_int64_t)(now - use_in)); } child_sa->get_usestats(child_sa, FALSE, @@ -287,8 +288,9 @@ static void log_child_sa(FILE *out, child_sa_t *child_sa, bool all) fprintf(out, ", %" PRIu64 " bytes_o", bytes_out); if (use_out) { - fprintf(out, " (%" PRIu64 " pkts, %" PRIu64 "s ago)", - packets_out, (u_int64_t)(now - use_out)); + fprintf(out, " (%" PRIu64 " pkt%s, %" PRIu64 "s ago)", + packets_out, (packets_out == 1) ? "": "s", + (u_int64_t)(now - use_out)); } fprintf(out, ", rekeying "); |