diff options
author | Kevin Butler <haqkrs@gmail.com> | 2013-09-01 00:24:07 +0100 |
---|---|---|
committer | Kevin Butler <haqkrs@gmail.com> | 2013-09-01 00:24:07 +0100 |
commit | 1bdb391ed0df979bc29ed1b62e7c0f3c9494a8d7 (patch) | |
tree | 1fc47f453def9cba2da8294236a26613ad0163bc /src/or | |
parent | 00bcc25d05dc0273323a2cae20c6aa62afd4b50a (diff) | |
download | tor-1bdb391ed0df979bc29ed1b62e7c0f3c9494a8d7.tar.gz tor-1bdb391ed0df979bc29ed1b62e7c0f3c9494a8d7.zip |
Added no_tempfile parameter to write_chunks_to_file to do non-atomic writes. Implements #1376.
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/dirvote.c | 2 | ||||
-rw-r--r-- | src/or/routerlist.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c index 12ceba8549..456a033ec9 100644 --- a/src/or/dirvote.c +++ b/src/or/dirvote.c @@ -3143,7 +3143,7 @@ dirvote_compute_consensuses(void) }); votefile = get_datadir_fname("v3-status-votes"); - write_chunks_to_file(votefile, votestrings, 0); + write_chunks_to_file(votefile, votestrings, 0, 0); tor_free(votefile); SMARTLIST_FOREACH(votestrings, sized_chunk_t *, c, tor_free(c)); smartlist_free(votestrings); diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 46da17e03b..3e8b9fbc01 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -428,7 +428,7 @@ trusted_dirs_flush_certs_to_disk(void) } DIGESTMAP_FOREACH_END; filename = get_datadir_fname("cached-certs"); - if (write_chunks_to_file(filename, chunks, 0)) { + if (write_chunks_to_file(filename, chunks, 0, 0)) { log_warn(LD_FS, "Error writing certificates to disk."); } tor_free(filename); @@ -1048,7 +1048,7 @@ router_rebuild_store(int flags, desc_store_t *store) smartlist_add(chunk_list, c); } SMARTLIST_FOREACH_END(sd); - if (write_chunks_to_file(fname_tmp, chunk_list, 1)<0) { + if (write_chunks_to_file(fname_tmp, chunk_list, 1, 1)<0) { log_warn(LD_FS, "Error writing router store to disk."); goto done; } |