summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2576b19)
raw | patch | inline | side by side (parent: 2576b19)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 12 Jun 2005 20:01:57 +0000 (20:01 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 12 Jun 2005 20:01:57 +0000 (20:01 +0000) |
to make sure it does not get taken into account accedenly later on.
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@634 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@634 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/rrd_update.c | patch | blob | history |
diff --git a/src/rrd_update.c b/src/rrd_update.c
index 95e927163e280aa23b3ea8b899354537bbb8adef..d8e8866cfac79053d212dc5e09a05d768e15b58c 100644 (file)
--- a/src/rrd_update.c
+++ b/src/rrd_update.c
for(i=0;i<rrd.stat_head->ds_cnt;i++){
enum dst_en dst_idx;
dst_idx= dst_conv(rrd.ds_def[i].dst);
- /* NOTE: DST_CDEF should never enter this if block, because
- * updvals[i+1][0] is initialized to 'U'; unless the caller
- * accidently specified a value for the DST_CDEF. To handle
- * this case, an extra check is required. */
+
+ /* make sure we do not build diffs with old last_ds values */
+ if(rrd.ds_def[i].par[DS_mrhb_cnt].u_cnt < interval
+ && ( dst_idx == DST_COUNTER || dst_idx == DST_DERIVE)){
+ strncpy(rrd.pdp_prep[i].last_ds,"U",LAST_DS_LEN-1);
+ }
+
+ /* NOTE: DST_CDEF should never enter this if block, because
+ * updvals[i+1][0] is initialized to 'U'; unless the caller
+ * accidently specified a value for the DST_CDEF. To handle
+ * this case, an extra check is required. */
+
if((updvals[i+1][0] != 'U') &&
(dst_idx != DST_CDEF) &&
rrd.ds_def[i].par[DS_mrhb_cnt].u_cnt >= interval) {