Only create version 4 rrd files if the new holtwinters MHW.. CF is used.
[rrdtool.git] / src / rrd_dump.c
index eb9b469..be000f9 100644 (file)
@@ -100,7 +100,11 @@ int rrd_dump_r(
 
     fputs("<!-- Round Robin Database Dump -->", out_file);
     fputs("<rrd>", out_file);
-    fprintf(out_file, "\t<version> %s </version>\n", RRD_VERSION);
+    if ( atoi(rrd.stat_head->version) <= 3) {
+        fprintf(out_file, "\t<version> %s </version>\n", RRD_VERSION3);
+    } else {
+        fprintf(out_file, "\t<version> %s </version>\n", RRD_VERSION);
+    }
     fprintf(out_file, "\t<step> %lu </step> <!-- Seconds -->\n",
             rrd.stat_head->pdp_step);
 #if HAVE_STRFTIME