projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
only include utime.h when necessary
[rrdtool.git]
/
src
/
rrd_fetch.c
diff --git
a/src/rrd_fetch.c
b/src/rrd_fetch.c
index
152018f
..
23be6e0
100644
(file)
--- a/
src/rrd_fetch.c
+++ b/
src/rrd_fetch.c
@@
-390,6
+390,8
@@
int rrd_fetch_fn(
else
rra_pointer = rrd.rra_ptr[chosen_rra].cur_row + 1 + start_offset;
else
rra_pointer = rrd.rra_ptr[chosen_rra].cur_row + 1 + start_offset;
+ rra_pointer = rra_pointer % (signed) rrd.rra_def[chosen_rra].row_cnt;
+
if (rrd_seek(rrd_file, (rra_base + (rra_pointer * (*ds_cnt)
* sizeof(rrd_value_t))),
SEEK_SET) != 0) {
if (rrd_seek(rrd_file, (rra_base + (rra_pointer * (*ds_cnt)
* sizeof(rrd_value_t))),
SEEK_SET) != 0) {
@@
-465,6
+467,7
@@
int rrd_fetch_fn(
}
rrd_close(rrd_file);
}
rrd_close(rrd_file);
+ rrd_free(&rrd);
return (0);
err_free_data:
free(*data);
return (0);
err_free_data:
free(*data);