/*****************************************************************************
- * RRDtool 1.2.23 Copyright by Tobi Oetiker, 1997-2007
+ * RRDtool 1.2.99907080300 Copyright by Tobi Oetiker, 1997-2007
*****************************************************************************
* rrd_restore.c creates new rrd from data dumped by rrd_dump.c
*****************************************************************************/
return -1;
}
/* make sure we output the right version only go over 3 if input is over 3 too */
- if (input_version > 3 ){
+ if (input_version > 3) {
strcpy(rrd->stat_head->version, RRD_VERSION);
} else {
strcpy(rrd->stat_head->version, RRD_VERSION3);
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));