summaryrefslogtreecommitdiff
path: root/src/tools/oping/oping_server.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2022-03-20 11:01:19 +0100
committerSander Vrijders <sander@ouroboros.rocks>2022-03-30 14:56:54 +0200
commita9ac222ee08158adacf4892c9b237305b1c6049e (patch)
tree49d0f352033c45536a5f48b7e39d3b9b9054a087 /src/tools/oping/oping_server.c
parent3b179d0ec9b85133ef412bae26c76eb74b75ea67 (diff)
downloadouroboros-a9ac222ee08158adacf4892c9b237305b1c6049e.tar.gz
ouroboros-a9ac222ee08158adacf4892c9b237305b1c6049e.zip
tools: Support --quiet option for oping server
The oping server will not print receiving packets when the --quiet (-Q) flag is passed, like the client. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/tools/oping/oping_server.c')
-rw-r--r--src/tools/oping/oping_server.c3
1 files changed, 2 insertions, 1 deletions
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);