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