Including vl->type, even when vl->type_instance is available to avoid over-writing...
authorMichael Schenck <mschenck@digitalocean.com>
Tue, 21 Oct 2014 17:31:40 +0000 (13:31 -0400)
committerMichael Schenck <mschenck@digitalocean.com>
Tue, 21 Oct 2014 17:31:40 +0000 (13:31 -0400)
src/write_tsdb.c

index aeed635..efc7146 100644 (file)
@@ -387,8 +387,8 @@ static int wt_format_name(char *ret, int ret_len,
         ssnprintf(ret, ret_len, "%s%s.%s.%s",
                   prefix, vl->plugin, vl->plugin_instance, vl->type);
     } else {
-        ssnprintf(ret, ret_len, "%s%s.%s.%s",
-                  prefix, vl->plugin, vl->plugin_instance, vl->type_instance);
+        ssnprintf(ret, ret_len, "%s%s.%s.%s.%s",
+                  prefix, vl->plugin, vl->plugin_instance, vl->type, vl->type_instance);
     }
 
     sfree(temp);