Merge pull request #1553 from aerusso/master
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Wed, 6 Apr 2016 18:10:23 +0000 (20:10 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Wed, 6 Apr 2016 18:10:23 +0000 (20:10 +0200)
Suppress spammy debug messages of #664

1  2 
src/utils_cmd_putval.c

diff --combined src/utils_cmd_putval.c
@@@ -29,7 -29,6 +29,7 @@@
  #include "plugin.h"
  
  #include "utils_parse_option.h"
 +#include "utils_cmd_putval.h"
  
  #define print_to_socket(fh, ...) \
      do { \
@@@ -163,7 -162,7 +163,7 @@@ int handle_putval (FILE *fh, char *buff
        sfree (identifier_copy);
  
        vl.values_len = ds->ds_num;
 -      vl.values = (value_t *) malloc (vl.values_len * sizeof (value_t));
 +      vl.values = malloc (vl.values_len * sizeof (*vl.values));
        if (vl.values == NULL)
        {
                print_to_socket (fh, "-1 malloc failed.\n");
        } /* 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");