summaryrefslogtreecommitdiff
path: root/src/daemon/slave.c
diff options
context:
space:
mode:
authorBenoit Dejean <bdejean@gmail.com>2015-06-21 22:39:11 +0200
committerBenoit Dejean <bdejean@gmail.com>2015-07-15 18:38:28 +0200
commit172f0a50bae98c0076a8cccac9ccc14b68754375 (patch)
treecbcdf9e62d598ecc511fe6d3b3a5f5f7f3ceb5ce /src/daemon/slave.c
parent887092a05db4708b4f46e6d788ccfe2e25c70ef6 (diff)
downloadlibgtop-172f0a50bae98c0076a8cccac9ccc14b68754375.tar.gz
Convert lots of fprintf(stderr, ...) to glibtop_debug*().
Diffstat (limited to 'src/daemon/slave.c')
-rw-r--r--src/daemon/slave.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/daemon/slave.c b/src/daemon/slave.c
index 1e9004b1..2858ee8a 100644
--- a/src/daemon/slave.c
+++ b/src/daemon/slave.c
@@ -41,10 +41,8 @@ handle_slave_connection (int input, int output)
glibtop_send_version (glibtop_global_server, output);
while (do_read (input, cmnd, sizeof (glibtop_command))) {
-#ifdef LIBGTOP_ENABLE_DEBUG
- fprintf (stderr, "Slave %d received command "
- "%llu from client.\n", getpid (), cmnd->command);
-#endif
+ glibtop_debug ("Slave %d received command "
+ "%llu from client.", getpid (), cmnd->command);
if (cmnd->data_size >= BUFSIZ)
glibtop_error ("Client sent %llu bytes, "
@@ -56,10 +54,8 @@ handle_slave_connection (int input, int output)
memset (parameter, 0, sizeof (parameter));
if (cmnd->data_size) {
-#ifdef LIBGTOP_ENABLE_DEBUG
- fprintf (stderr, "Client has %llu bytes of data.\n",
+ glibtop_debug ("Client has %llu bytes of data.",
cmnd->data_size);
-#endif
do_read (input, parameter, cmnd->data_size);