X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_cmd_putval.c;h=9cbba126f48496c5750d623dc6cd5fe8fd0cdccf;hb=5b5f7f4e3dd28d9e41469c331f3f9f6a09e3147b;hp=16a09b1b71093c7eb5752e4c28772fc34800a667;hpb=7746d34c8ecc4fa984187cf2b1a93d1b6d3a061b;p=collectd.git diff --git a/src/utils_cmd_putval.c b/src/utils_cmd_putval.c index 16a09b1b..9cbba126 100644 --- a/src/utils_cmd_putval.c +++ b/src/utils_cmd_putval.c @@ -32,7 +32,6 @@ } static int parse_value (const data_set_t *ds, value_list_t *vl, - const char *type, FILE *fh, char *buffer) { char *dummy; @@ -90,7 +89,7 @@ static int parse_value (const data_set_t *ds, value_list_t *vl, return (-1); } - plugin_dispatch_values (type, vl); + plugin_dispatch_values (vl); return (0); } /* int parse_value */ @@ -173,6 +172,7 @@ int handle_putval (FILE *fh, char **fields, int fields_num) sstrncpy (vl.host, hostname, sizeof (vl.host)); sstrncpy (vl.plugin, plugin, sizeof (vl.plugin)); + sstrncpy (vl.type, type, sizeof (vl.type)); if (plugin_instance != NULL) sstrncpy (vl.plugin_instance, plugin_instance, sizeof (vl.plugin_instance)); if (type_instance != NULL) @@ -201,7 +201,7 @@ int handle_putval (FILE *fh, char **fields, int fields_num) /* It's parse_value's job to write an error to `fh'. * This is not the case with `parse_option below. * Neither will write an success message. */ - if (parse_value (ds, &vl, type, fh, fields[i]) != 0) + if (parse_value (ds, &vl, fh, fields[i]) != 0) break; } else if (strchr (fields[i], '=') != NULL)