- skip(&ptr2);
- /* backwards compatibility w/ old patch */
- if (strncmp(ptr2, "<value>",7) == 0) {
- parse_patch1028_RRA_params(&ptr2,rrd,rra_index);
- } else {
- switch(cf_conv(rrd -> rra_def[rra_index].cf_nam)) {
- case CF_HWPREDICT:
- read_tag(&ptr2, "hw_alpha", "%lf",
- &(rrd->rra_def[rra_index].par[RRA_hw_alpha].u_val));
- read_tag(&ptr2, "hw_beta", "%lf",
- &(rrd->rra_def[rra_index].par[RRA_hw_beta].u_val));
- read_tag(&ptr2, "dependent_rra_idx", "%lu",
- &(rrd->rra_def[rra_index].par[RRA_dependent_rra_idx].u_cnt));
- break;
- case CF_SEASONAL:
- case CF_DEVSEASONAL:
- read_tag(&ptr2, "seasonal_gamma", "%lf",
- &(rrd->rra_def[rra_index].par[RRA_seasonal_gamma].u_val));
- read_tag(&ptr2, "seasonal_smooth_idx", "%lu",
- &(rrd->rra_def[rra_index].par[RRA_seasonal_smooth_idx].u_cnt));
- read_tag(&ptr2, "dependent_rra_idx", "%lu",
- &(rrd->rra_def[rra_index].par[RRA_dependent_rra_idx].u_cnt));
- break;
- case CF_FAILURES:
- read_tag(&ptr2, "delta_pos", "%lf",
- &(rrd->rra_def[rra_index].par[RRA_delta_pos].u_val));
- read_tag(&ptr2, "delta_neg", "%lf",
- &(rrd->rra_def[rra_index].par[RRA_delta_neg].u_val));
- read_tag(&ptr2, "window_len", "%lu",
- &(rrd->rra_def[rra_index].par[RRA_window_len].u_cnt));
- read_tag(&ptr2, "failure_threshold", "%lu",
- &(rrd->rra_def[rra_index].par[RRA_failure_threshold].u_cnt));
- /* fall thru */
- case CF_DEVPREDICT:
- read_tag(&ptr2, "dependent_rra_idx", "%lu",
- &(rrd->rra_def[rra_index].par[RRA_dependent_rra_idx].u_cnt));
- break;
- case CF_AVERAGE:
- case CF_MAXIMUM:
- case CF_MINIMUM:
- case CF_LAST:
- default:
- read_tag(&ptr2, "xff","%lf",
- &(rrd->rra_def[rra_index].par[RRA_cdp_xff_val].u_val));
- }
- }
- eat_tag(&ptr2, "/params");
- }
-
-
- eat_tag(&ptr2,"cdp_prep");
- for(i=0;i< (int)rrd->stat_head->ds_cnt;i++)
- {
- eat_tag(&ptr2,"ds");
- /* support to read CDP parameters */
- rra_index = rrd->stat_head->rra_cnt-1;
- skip(&ptr2);
- if ( input_version < 2 ){
- rrd->cdp_prep[rrd->stat_head->ds_cnt*(rra_index)+i].scratch[CDP_primary_val].u_val = 0.0;
- rrd->cdp_prep[rrd->stat_head->ds_cnt*(rra_index)+i].scratch[CDP_secondary_val].u_val = 0.0;
- read_tag(&ptr2,"value","%lf",&(rrd->cdp_prep[rrd->stat_head->ds_cnt
- *(rra_index) +i].scratch[CDP_val].u_val));
- read_tag(&ptr2,"unknown_datapoints","%lu",&(rrd->cdp_prep[rrd->stat_head->ds_cnt
- *(rra_index) +i].scratch[CDP_unkn_pdp_cnt].u_cnt));
- } else {
-
- if (strncmp(ptr2, "<value>",7) == 0) {
- parse_patch1028_CDP_params(&ptr2,rrd,rra_index,i);
- } else {
- read_tag(&ptr2, "primary_value","%lf",
- &(rrd->cdp_prep[rrd->stat_head->ds_cnt*(rra_index)
- +i].scratch[CDP_primary_val].u_val));
- read_tag(&ptr2, "secondary_value","%lf",
- &(rrd->cdp_prep[rrd->stat_head->ds_cnt*(rra_index)
- +i].scratch[CDP_secondary_val].u_val));
- switch(cf_conv(rrd->rra_def[rra_index].cf_nam)) {
- case CF_HWPREDICT:
- read_tag(&ptr2,"intercept","%lf",
- &(rrd->cdp_prep[rrd->stat_head->ds_cnt*(rra_index)
- +i].scratch[CDP_hw_intercept].u_val));
- read_tag(&ptr2,"last_intercept","%lf",
- &(rrd->cdp_prep[rrd->stat_head->ds_cnt*(rra_index)
- +i].scratch[CDP_hw_last_intercept].u_val));
- read_tag(&ptr2,"slope","%lf",
- &(rrd->cdp_prep[rrd->stat_head->ds_cnt*(rra_index)
- +i].scratch[CDP_hw_slope].u_val));
- read_tag(&ptr2,"last_slope","%lf",
- &(rrd->cdp_prep[rrd->stat_head->ds_cnt*(rra_index)
- +i].scratch[CDP_hw_last_slope].u_val));
- read_tag(&ptr2,"nan_count","%lu",
- &(rrd->cdp_prep[rrd->stat_head->ds_cnt*(rra_index)
- +i].scratch[CDP_null_count].u_cnt));
- read_tag(&ptr2,"last_nan_count","%lu",
- &(rrd->cdp_prep[rrd->stat_head->ds_cnt*(rra_index)
- +i].scratch[CDP_last_null_count].u_cnt));
- break;
- case CF_SEASONAL:
- case CF_DEVSEASONAL:
- read_tag(&ptr2,"seasonal","%lf",
- &(rrd->cdp_prep[rrd->stat_head->ds_cnt*(rra_index)
- +i].scratch[CDP_hw_seasonal].u_val));
- read_tag(&ptr2,"last_seasonal","%lf",
- &(rrd->cdp_prep[rrd->stat_head->ds_cnt*(rra_index)
- +i].scratch[CDP_hw_last_seasonal].u_val));
- read_tag(&ptr2,"init_flag","%lu",
- &(rrd->cdp_prep[rrd->stat_head->ds_cnt*(rra_index)
- +i].scratch[CDP_init_seasonal].u_cnt));
- break;
- case CF_DEVPREDICT:
- break;
- case CF_FAILURES:
- parse_FAILURES_history(&ptr2,rrd,rra_index,i);
- break;
- case CF_AVERAGE:
- case CF_MAXIMUM:
- case CF_MINIMUM:
- case CF_LAST:
- default:
- read_tag(&ptr2,"value","%lf",&(rrd->cdp_prep[rrd->stat_head->ds_cnt
- *(rra_index) +i].scratch[CDP_val].u_val));
- read_tag(&ptr2,"unknown_datapoints","%lu",&(rrd->cdp_prep[rrd->stat_head->ds_cnt
- *(rra_index) +i].scratch[CDP_unkn_pdp_cnt].u_cnt));
- break;
- }
- }
- }
- eat_tag(&ptr2,"/ds");
- }
- eat_tag(&ptr2,"/cdp_prep");
- rrd->rra_def[rrd->stat_head->rra_cnt-1].row_cnt=0;
- eat_tag(&ptr2,"database");
- ptr3 = ptr2;
- while (eat_tag(&ptr3,"row") == 1){
-
- if(mempool==0){
- mempool = 1000;
- if((rrd->rrd_value = rrd_realloc(rrd->rrd_value,
- (rows+mempool)*(rrd->stat_head->ds_cnt)
- *sizeof(rrd_value_t)))==NULL) {
- rrd_set_error("allocating rrd_values"); return -1; }
- }
- rows++;
- mempool--;
- rrd->rra_def[rrd->stat_head->rra_cnt-1].row_cnt++;
- for(i=0;i< (int)rrd->stat_head->ds_cnt;i++){
-
- rrd_value_t * value = &(rrd->rrd_value[(rows-1)*rrd->stat_head->ds_cnt+i]);
-
- read_tag(&ptr3,"v","%lf", value);
-
- if (
- (rc == 1) /* do we have to check for the ranges */
- &&
- (!isnan(*value)) /* not a NAN value */
- &&
- (dst_conv(rrd->ds_def[i].dst) != DST_CDEF)
- &&
- ( /* min defined and in the range ? */
- (!isnan(rrd->ds_def[i].par[DS_min_val].u_val)
- && (*value < rrd->ds_def[i].par[DS_min_val].u_val))
- || /* max defined and in the range ? */
- (!isnan(rrd->ds_def[i].par[DS_max_val].u_val)
- && (*value > rrd->ds_def[i].par[DS_max_val].u_val))
- )
- ) {
- fprintf (stderr, "out of range found [ds: %lu], [value : %0.10e]\n", i, *value);
- *value = DNAN;
- }
- }
- eat_tag(&ptr3,"/row");
- ptr2=ptr3;
- }
- eat_tag(&ptr2,"/database");
- eat_tag(&ptr2,"/rra");
- ptr=ptr2;
- }
- eat_tag(&ptr,"/rrd");
-
- if((rrd->rra_ptr = calloc(1,sizeof(rra_ptr_t)*rrd->stat_head->rra_cnt)) == NULL) {
- rrd_set_error("allocating rra_ptr");
- return(-1);
- }
-
- for(i=0; i < (int)rrd->stat_head->rra_cnt; i++) {
- /* last row in the xml file is the most recent; as
- * rrd_update increments the current row pointer, set cur_row
- * here to the last row. */
- rrd->rra_ptr[i].cur_row = rrd->rra_def[i].row_cnt-1;
- }
- if (ptr==NULL)
- return -1;
- return 1;
+ /* clean out memory to make sure no data gets stored from previous tasks */
+ memset(&(rrd->pdp_prep[rrd->stat_head->ds_cnt - 1]), 0,
+ sizeof(pdp_prep_t));
+
+ read_tag(&ptr2, "name", DS_NAM_FMT,
+ rrd->ds_def[rrd->stat_head->ds_cnt - 1].ds_nam);
+
+ read_tag(&ptr2, "type", DST_FMT,
+ rrd->ds_def[rrd->stat_head->ds_cnt - 1].dst);
+ /* test for valid type */
+ if ((int) dst_conv(rrd->ds_def[rrd->stat_head->ds_cnt - 1].dst) == -1)
+ return -1;
+
+ if (dst_conv(rrd->ds_def[rrd->stat_head->ds_cnt - 1].dst) != DST_CDEF) {
+ read_tag(&ptr2, "minimal_heartbeat", "%lu",
+ &(rrd->ds_def[rrd->stat_head->ds_cnt - 1].
+ par[DS_mrhb_cnt].u_cnt));
+ read_tag(&ptr2, "min", "%lf",
+ &(rrd->ds_def[rrd->stat_head->ds_cnt - 1].
+ par[DS_min_val].u_val));
+ read_tag(&ptr2, "max", "%lf",
+ &(rrd->ds_def[rrd->stat_head->ds_cnt - 1].
+ par[DS_max_val].u_val));
+ } else { /* DST_CDEF */
+ char buffer[1024];
+
+ read_tag(&ptr2, "cdef", "%1000s", buffer);
+ parseCDEF_DS(buffer, rrd, rrd->stat_head->ds_cnt - 1);
+ if (rrd_test_error())
+ return -1;
+ }
+
+ read_tag(&ptr2, "last_ds", "%30s",
+ rrd->pdp_prep[rrd->stat_head->ds_cnt - 1].last_ds);
+ read_tag(&ptr2, "value", "%lf",
+ &(rrd->pdp_prep[rrd->stat_head->ds_cnt - 1].scratch[PDP_val].
+ u_val));
+ read_tag(&ptr2, "unknown_sec", "%lu",
+ &(rrd->pdp_prep[rrd->stat_head->ds_cnt - 1].
+ scratch[PDP_unkn_sec_cnt].u_cnt));
+ eat_tag(&ptr2, "/ds");
+ ptr = ptr2;
+ }
+
+ ptr2 = ptr;
+ while (eat_tag(&ptr2, "rra") == 1) {
+ rrd->stat_head->rra_cnt++;
+
+ /* allocate and reset rra definition areas */
+ if ((rrd->rra_def =
+ rrd_realloc(rrd->rra_def,
+ rrd->stat_head->rra_cnt * sizeof(rra_def_t))) ==
+ NULL) {
+ rrd_set_error("allocating rra_def");
+ return -1;
+ }
+ memset(&(rrd->rra_def[rrd->stat_head->rra_cnt - 1]), 0,
+ sizeof(rra_def_t));
+
+ /* allocate and reset consolidation point areas */
+ if ((rrd->cdp_prep = rrd_realloc(rrd->cdp_prep,
+ rrd->stat_head->rra_cnt
+ * rrd->stat_head->ds_cnt *
+ sizeof(cdp_prep_t))) == NULL) {
+ rrd_set_error("allocating cdp_prep");
+ return -1;
+ }
+
+ memset(&
+ (rrd->
+ cdp_prep[rrd->stat_head->ds_cnt *
+ (rrd->stat_head->rra_cnt - 1)]), 0,
+ rrd->stat_head->ds_cnt * sizeof(cdp_prep_t));
+
+
+ read_tag(&ptr2, "cf", CF_NAM_FMT,
+ rrd->rra_def[rrd->stat_head->rra_cnt - 1].cf_nam);
+ /* test for valid type */
+ if ((int) cf_conv(rrd->rra_def[rrd->stat_head->rra_cnt - 1].cf_nam) ==
+ -1)
+ return -1;
+
+ read_tag(&ptr2, "pdp_per_row", "%lu",
+ &(rrd->rra_def[rrd->stat_head->rra_cnt - 1].pdp_cnt));
+ /* support to read RRA parameters */
+ rra_index = rrd->stat_head->rra_cnt - 1;
+ if (input_version < 2) {
+ read_tag(&ptr2, "xff", "%lf",
+ &(rrd->rra_def[rra_index].par[RRA_cdp_xff_val].u_val));
+ } else {
+ if (eat_tag(&ptr2, "params") != 1) {
+ rrd_set_error("could not find params tag to eat and skip");
+ return -1;
+ }
+ skip(&ptr2);
+ /* backwards compatibility w/ old patch */
+ if (strncmp(ptr2, "<value>", 7) == 0) {
+ parse_patch1028_RRA_params(&ptr2, rrd, rra_index);
+ } else {
+ switch (cf_conv(rrd->rra_def[rra_index].cf_nam)) {
+ case CF_HWPREDICT:
+ case CF_MHWPREDICT:
+ read_tag(&ptr2, "hw_alpha", "%lf",
+ &(rrd->rra_def[rra_index].par[RRA_hw_alpha].
+ u_val));
+ read_tag(&ptr2, "hw_beta", "%lf",
+ &(rrd->rra_def[rra_index].par[RRA_hw_beta].
+ u_val));
+ read_tag(&ptr2, "dependent_rra_idx", "%lu",
+ &(rrd->rra_def[rra_index].
+ par[RRA_dependent_rra_idx].u_cnt));
+ break;
+ case CF_SEASONAL:
+ case CF_DEVSEASONAL:
+ read_tag(&ptr2, "seasonal_gamma", "%lf",
+ &(rrd->rra_def[rra_index].
+ par[RRA_seasonal_gamma].u_val));
+ read_tag(&ptr2, "seasonal_smooth_idx", "%lu",
+ &(rrd->rra_def[rra_index].
+ par[RRA_seasonal_smooth_idx].u_cnt));
+ if (atoi(rrd->stat_head->version) >= 4) {
+ read_tag(&ptr2, "smoothing_window", "%lf",
+ &(rrd->rra_def[rra_index].
+ par[RRA_seasonal_smoothing_window].u_val));
+ }
+ read_tag(&ptr2, "dependent_rra_idx", "%lu",
+ &(rrd->rra_def[rra_index].
+ par[RRA_dependent_rra_idx].u_cnt));
+ break;
+ case CF_FAILURES:
+ read_tag(&ptr2, "delta_pos", "%lf",
+ &(rrd->rra_def[rra_index].par[RRA_delta_pos].
+ u_val));
+ read_tag(&ptr2, "delta_neg", "%lf",
+ &(rrd->rra_def[rra_index].par[RRA_delta_neg].
+ u_val));
+ read_tag(&ptr2, "window_len", "%lu",
+ &(rrd->rra_def[rra_index].par[RRA_window_len].
+ u_cnt));
+ read_tag(&ptr2, "failure_threshold", "%lu",
+ &(rrd->rra_def[rra_index].
+ par[RRA_failure_threshold].u_cnt));
+ /* fall thru */
+ case CF_DEVPREDICT:
+ read_tag(&ptr2, "dependent_rra_idx", "%lu",
+ &(rrd->rra_def[rra_index].
+ par[RRA_dependent_rra_idx].u_cnt));
+ break;
+ case CF_AVERAGE:
+ case CF_MAXIMUM:
+ case CF_MINIMUM:
+ case CF_LAST:
+ default:
+ read_tag(&ptr2, "xff", "%lf",
+ &(rrd->rra_def[rra_index].par[RRA_cdp_xff_val].
+ u_val));
+ }
+ }
+ eat_tag(&ptr2, "/params");
+ }
+
+
+ eat_tag(&ptr2, "cdp_prep");
+ for (i = 0; i < (int) rrd->stat_head->ds_cnt; i++) {
+ eat_tag(&ptr2, "ds");
+ /* support to read CDP parameters */
+ rra_index = rrd->stat_head->rra_cnt - 1;
+ skip(&ptr2);
+ if (input_version < 2) {
+ rrd->cdp_prep[rrd->stat_head->ds_cnt * (rra_index) +
+ i].scratch[CDP_primary_val].u_val = 0.0;
+ rrd->cdp_prep[rrd->stat_head->ds_cnt * (rra_index) +
+ i].scratch[CDP_secondary_val].u_val = 0.0;
+ read_tag(&ptr2, "value", "%lf",
+ &(rrd->
+ cdp_prep[rrd->stat_head->ds_cnt * (rra_index) +
+ i].scratch[CDP_val].u_val));
+ read_tag(&ptr2, "unknown_datapoints", "%lu",
+ &(rrd->
+ cdp_prep[rrd->stat_head->ds_cnt * (rra_index) +
+ i].scratch[CDP_unkn_pdp_cnt].u_cnt));
+ } else {
+
+ if (strncmp(ptr2, "<value>", 7) == 0) {
+ parse_patch1028_CDP_params(&ptr2, rrd, rra_index, i);
+ } else {
+ read_tag(&ptr2, "primary_value", "%lf",
+ &(rrd->
+ cdp_prep[rrd->stat_head->ds_cnt * (rra_index)
+ + i].scratch[CDP_primary_val].u_val));
+ read_tag(&ptr2, "secondary_value", "%lf",
+ &(rrd->
+ cdp_prep[rrd->stat_head->ds_cnt * (rra_index)
+ +
+ i].scratch[CDP_secondary_val].u_val));
+ switch (cf_conv(rrd->rra_def[rra_index].cf_nam)) {
+ case CF_HWPREDICT:
+ case CF_MHWPREDICT:
+ read_tag(&ptr2, "intercept", "%lf",
+ &(rrd->
+ cdp_prep[rrd->stat_head->ds_cnt *
+ (rra_index)
+ +
+ i].scratch[CDP_hw_intercept].
+ u_val));
+ read_tag(&ptr2, "last_intercept", "%lf",
+ &(rrd->
+ cdp_prep[rrd->stat_head->ds_cnt *
+ (rra_index)
+ +
+ i].scratch[CDP_hw_last_intercept].
+ u_val));
+ read_tag(&ptr2, "slope", "%lf",
+ &(rrd->
+ cdp_prep[rrd->stat_head->ds_cnt *
+ (rra_index)
+ +
+ i].scratch[CDP_hw_slope].u_val));
+ read_tag(&ptr2, "last_slope", "%lf",
+ &(rrd->
+ cdp_prep[rrd->stat_head->ds_cnt *
+ (rra_index)
+ +
+ i].scratch[CDP_hw_last_slope].
+ u_val));
+ read_tag(&ptr2, "nan_count", "%lu",
+ &(rrd->
+ cdp_prep[rrd->stat_head->ds_cnt *
+ (rra_index)
+ +
+ i].scratch[CDP_null_count].
+ u_cnt));
+ read_tag(&ptr2, "last_nan_count", "%lu",
+ &(rrd->
+ cdp_prep[rrd->stat_head->ds_cnt *
+ (rra_index)
+ +
+ i].scratch[CDP_last_null_count].
+ u_cnt));
+ break;
+ case CF_SEASONAL:
+ case CF_DEVSEASONAL:
+ read_tag(&ptr2, "seasonal", "%lf",
+ &(rrd->
+ cdp_prep[rrd->stat_head->ds_cnt *
+ (rra_index)
+ +
+ i].scratch[CDP_hw_seasonal].
+ u_val));
+ read_tag(&ptr2, "last_seasonal", "%lf",
+ &(rrd->
+ cdp_prep[rrd->stat_head->ds_cnt *
+ (rra_index)
+ +
+ i].scratch[CDP_hw_last_seasonal].
+ u_val));
+ read_tag(&ptr2, "init_flag", "%lu",
+ &(rrd->
+ cdp_prep[rrd->stat_head->ds_cnt *
+ (rra_index)
+ +
+ i].scratch[CDP_init_seasonal].
+ u_cnt));
+ break;
+ case CF_DEVPREDICT:
+ break;
+ case CF_FAILURES:
+ parse_FAILURES_history(&ptr2, rrd, rra_index, i);
+ break;
+ case CF_AVERAGE:
+ case CF_MAXIMUM:
+ case CF_MINIMUM:
+ case CF_LAST:
+ default:
+ read_tag(&ptr2, "value", "%lf",
+ &(rrd->
+ cdp_prep[rrd->stat_head->ds_cnt *
+ (rra_index) +
+ i].scratch[CDP_val].u_val));
+ read_tag(&ptr2, "unknown_datapoints", "%lu",
+ &(rrd->
+ cdp_prep[rrd->stat_head->ds_cnt *
+ (rra_index) +
+ i].scratch[CDP_unkn_pdp_cnt].
+ u_cnt));
+ break;
+ }
+ }
+ }
+ eat_tag(&ptr2, "/ds");
+ }
+ eat_tag(&ptr2, "/cdp_prep");
+ rrd->rra_def[rrd->stat_head->rra_cnt - 1].row_cnt = 0;
+ eat_tag(&ptr2, "database");
+ ptr3 = ptr2;
+ while (eat_tag(&ptr3, "row") == 1) {
+
+ if (mempool == 0) {
+ mempool = 1000;
+ if ((rrd->rrd_value = rrd_realloc(rrd->rrd_value,
+ (rows +
+ mempool) *
+ (rrd->stat_head->ds_cnt)
+ * sizeof(rrd_value_t))) ==
+ NULL) {
+ rrd_set_error("allocating rrd_values");
+ return -1;
+ }
+ }
+ rows++;
+ mempool--;
+ rrd->rra_def[rrd->stat_head->rra_cnt - 1].row_cnt++;
+ for (i = 0; i < (int) rrd->stat_head->ds_cnt; i++) {
+
+ rrd_value_t *value =
+ &(rrd->
+ rrd_value[(rows - 1) * rrd->stat_head->ds_cnt + i]);
+
+ read_tag(&ptr3, "v", "%lf", value);
+
+ if ((rc == 1) /* do we have to check for the ranges */
+ &&(!isnan(*value)) /* not a NAN value */
+ &&(dst_conv(rrd->ds_def[i].dst) != DST_CDEF)
+ && ( /* min defined and in the range ? */
+ (!isnan(rrd->ds_def[i].par[DS_min_val].u_val)
+ && (*value <
+ rrd->ds_def[i].par[DS_min_val].u_val))
+ || /* max defined and in the range ? */
+ (!isnan(rrd->ds_def[i].par[DS_max_val].u_val)
+ && (*value >
+ rrd->ds_def[i].par[DS_max_val].u_val))
+ )
+ ) {
+ fprintf(stderr,
+ "out of range found [ds: %lu], [value : %0.10e]\n",
+ i, *value);
+ *value = DNAN;
+ }
+ }
+ eat_tag(&ptr3, "/row");
+ ptr2 = ptr3;
+ }
+ eat_tag(&ptr2, "/database");
+ eat_tag(&ptr2, "/rra");
+ ptr = ptr2;
+ }
+ eat_tag(&ptr, "/rrd");
+
+ if ((rrd->rra_ptr =
+ calloc(1, sizeof(rra_ptr_t) * rrd->stat_head->rra_cnt)) == NULL) {
+ rrd_set_error("allocating rra_ptr");
+ return (-1);
+ }
+
+ for (i = 0; i < (int) rrd->stat_head->rra_cnt; i++) {
+ /* last row in the xml file is the most recent; as
+ * rrd_update increments the current row pointer, set cur_row
+ * here to the last row. */
+ rrd->rra_ptr[i].cur_row = rrd->rra_def[i].row_cnt - 1;
+ }
+ if (ptr == NULL)
+ return -1;
+ return 1;