From: Tobias 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-Tag: 1.2rc1~117 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a3daa122be84a2768d5f700935733e7f47805ab7;p=thirdparty%2Frrdtool-1.x.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 7217041e..44312bd0 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",