X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_update.c;h=de708df7564ff9fab0f6c30f6e4686c0b71d3f2a;hb=88ec7a41d5ba332d0a902a17c0ef0cb01d133a30;hp=7217041ee4bee2ca1a2231b7a9d80dcd8718a9bc;hpb=c5282fa77324d86f882cfda15f43b62d2b1f8bc2;p=rrdtool.git diff --git a/src/rrd_update.c b/src/rrd_update.c index 7217041..de708df 100644 --- a/src/rrd_update.c +++ b/src/rrd_update.c @@ -5,6 +5,13 @@ ***************************************************************************** * $Id$ * $Log$ + * Revision 1.14 2003/11/11 19:46:21 oetiker + * replaced time_value with rrd_time_value as MacOS X introduced a struct of that name in their standard headers + * + * 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 * @@ -462,7 +469,7 @@ _rrd_update(char *filename, char *template, int argc, char **argv, char *p; char *parsetime_error = NULL; enum {atstyle, normal} timesyntax; - struct time_value ds_tv; + struct rrd_time_value ds_tv; if (stepper == NULL){ rrd_set_error("failed duplication argv entry"); free(updvals); @@ -1219,10 +1226,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",