aboutsummaryrefslogtreecommitdiff
path: root/main.h
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2009-11-05 04:41:36 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2009-11-05 04:41:36 +0000
commite4c05d31778a85014b2a52e2f20753b38dfbf950 (patch)
tree8b82ec196f05e1297dd87e0d857507f8ea1cf975 /main.h
parentb7362c07ae42ac4282361ee95b82424d502f1b82 (diff)
unix build merged in, bitmap resources from xpm instead of rc, better addr relay, better selection of addrs by time last seen for faster connect
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@32 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'main.h')
-rw-r--r--main.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/main.h b/main.h
index a0258cf2ce..6d8f0ed87c 100644
--- a/main.h
+++ b/main.h
@@ -968,6 +968,14 @@ public:
return error("CBlock::WriteToDisk() : ftell failed");
fileout << *this;
+ // Flush stdio buffers and commit to disk before returning
+ fflush(fileout);
+#ifdef __WXMSW__
+ _commit(_fileno(fileout));
+#else
+ fsync(fileno(fileout));
+#endif
+
return true;
}