summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0e7efaa)
raw | patch | inline | side by side (parent: 0e7efaa)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 24 Feb 2008 14:26:16 +0000 (14:26 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 24 Feb 2008 14:26:16 +0000 (14:26 +0000) |
src/rrd_restore.c | patch | blob | history |
diff --git a/src/rrd_restore.c b/src/rrd_restore.c
index 6997cab9501230edde74d966434b45029913de88..89743a03701fae6995b93da8db89a97dc063f8e7 100644 (file)
--- a/src/rrd_restore.c
+++ b/src/rrd_restore.c
eat_tag(&ptr2, "cdp_prep");
for (i = 0; i < (int) rrd->stat_head->ds_cnt; i++) {
- eat_tag(&ptr2, "ds");
+ if (eat_tag(&ptr2, "ds") != 1){
+ rrd_set_error("expected to find %lu <ds> entries in <cdp_prep>",rrd->stat_head->ds_cnt);
+ return -1;
+ }
/* support to read CDP parameters */
rra_index = rrd->stat_head->rra_cnt - 1;
skip(&ptr2);