Code

Lua plugin: wrap debug code in COLLECT_DEBUG
[collectd.git] / src / utils_cmd_putval.c
index 69af2e4ae97c663fcecae4bd5ffe884cd658e09a..bf3e2b6f2b9880cf50f6d602bf721ed42c51afb7 100644 (file)
@@ -25,6 +25,7 @@
  **/
 
 #include "collectd.h"
+
 #include "common.h"
 #include "plugin.h"
 
@@ -218,7 +219,8 @@ int handle_putval (FILE *fh, char *buffer)
        } /* while (*buffer != 0) */
        /* Done parsing the options. */
 
-       print_to_socket (fh, "0 Success: %i %s been dispatched.\n",
+       if (fh!=stdout)
+               print_to_socket (fh, "0 Success: %i %s been dispatched.\n",
                        values_submitted,
                        (values_submitted == 1) ? "value has" : "values have");