From: oetiker Date: Tue, 11 Nov 2003 19:38:03 +0000 (+0000) Subject: rrd files should NOT change size ever ... bulk update code wa buggy. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=087ab4a457489d797e3d25c978a2682ea8cf512e;p=rrdtool.git rrd files should NOT change size ever ... bulk update code wa buggy. -- David M. Grimes git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@217 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_update.c b/src/rrd_update.c index 7217041..44312bd 100644 --- a/src/rrd_update.c +++ b/src/rrd_update.c @@ -5,6 +5,10 @@ ***************************************************************************** * $Id$ * $Log$ + * Revision 1.13 2003/11/11 19:38:03 oetiker + * rrd files should NOT change size ever ... bulk update code wa buggy. + * -- David M. Grimes + * * Revision 1.12 2003/09/04 13:16:12 oetiker * should not assigne but compare ... grrrrr * @@ -1219,10 +1223,9 @@ _rrd_update(char *filename, char *template, int argc, char **argv, /* write other rows of the bulk update, if any */ scratch_idx = CDP_secondary_val; - for ( ; rra_step_cnt[i] > 1; - rra_step_cnt[i]--, rrd.rra_ptr[i].cur_row++) + for ( ; rra_step_cnt[i] > 1; rra_step_cnt[i]--) { - if (rrd.rra_ptr[i].cur_row == rrd.rra_def[i].row_cnt) + if (++rrd.rra_ptr[i].cur_row == rrd.rra_def[i].row_cnt) { #ifdef DEBUG fprintf(stderr,"Wraparound for RRA %s, %lu updates left\n",