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.tokkee.org/?a=commitdiff_plain;h=147247071958caa85a9ac528052d0d8b39f004a5;p=rrdtool-all.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@217 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/src/rrd_update.c b/program/src/rrd_update.c index 7217041e..44312bd0 100644 --- a/program/src/rrd_update.c +++ b/program/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",