- /* 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. */
+