summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e96691b)
raw | patch | inline | side by side (parent: e96691b)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 11 Jun 2007 10:09:54 +0000 (10:09 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 11 Jun 2007 10:09:54 +0000 (10:09 +0000) |
- fix maintaining our file-pos when we have to wrap the rra_ptr in
update().
- no need to update the header-data a second time for the mmap case.
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1105 a5681a0c-68f1-0310-ab6d-d61299d08faa
update().
- no need to update the header-data a second time for the mmap case.
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1105 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/rrd_update.c | patch | blob | history |
diff --git a/src/rrd_update.c b/src/rrd_update.c
index b114c9bfa61fa87a1e34488c465a8dd8386311e4..d8632a74057b6ae84956aa1e3506c9baa1402f1d 100644 (file)
--- a/src/rrd_update.c
+++ b/src/rrd_update.c
(rrd.stat_head->ds_cnt) * (rrd.rra_ptr[i].cur_row) *
sizeof(rrd_value_t);
if (rra_pos_tmp != rra_current) {
-#ifndef HAVE_MMAP
if (rrd_seek(rrd_file, rra_pos_tmp, SEEK_SET) != 0) {
rrd_set_error("seek error in rrd");
break;
}
-#endif
rra_current = rra_pos_tmp;
}
#ifdef DEBUG
rrd_set_error("seek rrd for live header writeback");
goto err_free_pdp_new;
}
-
+#ifndef HAVE_MMAP
if (version >= 3) {
if (rrd_write(rrd_file, rrd.live_head,
sizeof(live_head_t) * 1) != sizeof(live_head_t) * 1) {
rrd_set_error("rrd_write rra_ptr to rrd");
goto err_free_pdp_new;
}
+#endif
#ifdef HAVE_POSIX_FADVISExxx
/* with update we have write ops, so they will probably not be done by now, this means