From 9106f186793f0bb8ed8b1849a1f6df295eb6b181 Mon Sep 17 00:00:00 2001 From: oetiker Date: Wed, 23 Apr 2003 22:47:00 +0000 Subject: [PATCH] fixed version checks to only complain if xml version is > than current RRD version git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@200 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_restore.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rrd_restore.c b/src/rrd_restore.c index 150f1ee..4371d65 100644 --- a/src/rrd_restore.c +++ b/src/rrd_restore.c @@ -122,10 +122,10 @@ int xml2rrd(char* buf, rrd_t* rrd, char rc){ strcpy(rrd->stat_head->cookie,RRD_COOKIE); read_tag(&ptr,"version","%4[0-9]",rrd->stat_head->version); /* added primitive version checking */ - if (atoi(rrd -> stat_head -> version) != 2) + if (atoi(rrd -> stat_head -> version) > atoi(RRD_VERSION) ) { - rrd_set_error("Incompatible file version, detected version %s, required version %s\n", - rrd -> stat_head -> version, RRD_VERSION); + rrd_set_error("Incompatible file version, detected version %s is bigger than supported version %s\n", + rrd -> stat_head -> version, RRD_VERSION ); free(rrd -> stat_head); return -1; } -- 2.11.0