summaryrefslogtreecommitdiff
path: root/src/tools/oping
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/oping')
-rw-r--r--src/tools/oping/oping.c5
-rw-r--r--src/tools/oping/oping_server.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/tools/oping/oping.c b/src/tools/oping/oping.c
index 093f3e84..62eb94d5 100644
--- a/src/tools/oping/oping.c
+++ b/src/tools/oping/oping.c
@@ -96,6 +96,8 @@ struct s {
fqueue_t * fq;
pthread_mutex_t lock;
+ bool quiet;
+
pthread_t cleaner_pt;
pthread_t accept_pt;
pthread_t server_pt;
@@ -170,6 +172,7 @@ int main(int argc,
client.timestamp = false;
client.qs = qos_raw;
client.quiet = false;
+ server.quiet = false;
while (argc > 0) {
if (strcmp(*argv, "-i") == 0 ||
@@ -207,7 +210,7 @@ int main(int argc,
} else if (strcmp(*argv, "-Q") == 0 ||
strcmp(*argv, "--quiet") == 0) {
client.quiet = true;
-
+ server.quiet = true;
} else {
goto fail;
}
diff --git a/src/tools/oping/oping_server.c b/src/tools/oping/oping_server.c
index ec9e85ab..b2eb308e 100644
--- a/src/tools/oping/oping_server.c
+++ b/src/tools/oping/oping_server.c
@@ -105,7 +105,8 @@ void * server_thread(void *o)
continue;
}
- printf("Received %d bytes on fd %d.\n", msg_len, fd);
+ if (!server.quiet)
+ printf("Received %d bytes on fd %d.\n", msg_len, fd);
clock_gettime(CLOCK_REALTIME, &now);