return (0);
} /* int handle_putval */
+int create_putval (char *ret, size_t ret_len, /* {{{ */
+ const data_set_t *ds, const value_list_t *vl)
+{
+ char buffer_ident[6 * DATA_MAX_NAME_LEN];
+ char buffer_values[1024];
+ int status;
+
+ status = FORMAT_VL (buffer_ident, sizeof (buffer_ident), vl);
+ if (status != 0)
+ return (status);
+ escape_string (buffer_ident, sizeof (buffer_ident));
+
+ status = format_values (buffer_values, sizeof (buffer_values),
+ ds, vl, /* store rates = */ 0);
+ if (status != 0)
+ return (status);
+ escape_string (buffer_values, sizeof (buffer_values));
+
+ ssnprintf (ret, ret_len,
+ "PUTVAL %s interval=%i %s",
+ buffer_ident,
+ (vl->interval > 0) ? vl->interval : interval_g,
+ buffer_values);
+
+ return (0);
+} /* }}} int create_putval */
#include <stdio.h>
+#include "plugin.h"
+
int handle_putval (FILE *fh, char *buffer);
+int create_putval (char *ret, size_t ret_len,
+ const data_set_t *ds, const value_list_t *vl);
+
#endif /* UTILS_CMD_PUTVAL_H */