diff --git a/src/rrdtool.c b/src/rrdtool.c
index 93c9d7a8ac670897747a3f6231bd5f2f8df34de1..fad1e4b4455d5c6403df9ecc3a09522edade8981 100644 (file)
--- a/src/rrdtool.c
+++ b/src/rrdtool.c
if (strlen (vl->type_instance) > 0)
status = snprintf (buffer + offset, buffer_len - offset,
- "%s-%s.rrd", ds->type, vl->type_instance);
+ "%s-%s.rrd", vl->type, vl->type_instance);
else
status = snprintf (buffer + offset, buffer_len - offset,
- "%s.rrd", ds->type);
+ "%s.rrd", vl->type);
if ((status < 1) || (status >= buffer_len - offset))
return (-1);
offset += status;
char values[512];
int status;
+ if (0 != strcmp (ds->type, vl->type)) {
+ ERROR ("rrdtool plugin: DS type does not match value list type");
+ return -1;
+ }
+
if (value_list_to_filename (filename, sizeof (filename), ds, vl) != 0)
return (-1);