summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b819ef6)
raw | patch | inline | side by side (parent: b819ef6)
author | Florian Forster <octo@verplant.org> | |
Wed, 27 Oct 2010 10:11:51 +0000 (12:11 +0200) | ||
committer | Florian Forster <octo@verplant.org> | |
Wed, 27 Oct 2010 10:11:51 +0000 (12:11 +0200) |
src/oping.c | patch | blob | history |
diff --git a/src/oping.c b/src/oping.c
index 84d97afdb7206fbded38f47fa898769519fecbad..d84219eadad61d1b18f8a0bb392000c61d70d559 100644 (file)
--- a/src/oping.c
+++ b/src/oping.c
|| (latency > (average + stddev)))
color = OPING_YELLOW;
- HOST_PRINTF ("%zu bytes from %s (%s): icmp_seq=%u ttl=%i qos=%s"
- " time=",
+ HOST_PRINTF ("%zu bytes from %s (%s): icmp_seq=%u ttl=%i ",
data_len, context->host, context->addr,
sequence, recv_ttl,
format_qos (recv_qos, recv_qos_str, sizeof (recv_qos_str)));
+ if ((recv_qos != 0) || (opt_send_qos != 0))
+ {
+ HOST_PRINTF ("qos=%s ",
+ format_qos (recv_qos, recv_qos_str, sizeof (recv_qos_str)));
+ }
+ HOST_PRINTF ("time=");
wattron (main_win, COLOR_PAIR(color));
HOST_PRINTF ("%.2f", latency);
wattroff (main_win, COLOR_PAIR(color));
else
{
#endif
- HOST_PRINTF ("%zu bytes from %s (%s): icmp_seq=%u ttl=%i qos=%s"
- " time=%.2f ms\n",
+ HOST_PRINTF ("%zu bytes from %s (%s): icmp_seq=%u ttl=%i ",
data_len,
context->host, context->addr,
- sequence, recv_ttl,
- format_qos (recv_qos, recv_qos_str, sizeof (recv_qos_str)),
- latency);
+ sequence, recv_ttl);
+ if ((recv_qos != 0) || (opt_send_qos != 0))
+ {
+ HOST_PRINTF ("qos=%s ",
+ format_qos (recv_qos, recv_qos_str, sizeof (recv_qos_str)));
+ }
+ HOST_PRINTF ("time=%.2f ms\n", latency);
#if USE_NCURSES
}
#endif