mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Write consensus files in binary mode
This will help us out on windows now that we mmap files. Fixes part of ticket 28614.
This commit is contained in:
parent
d9010c5b67
commit
bbd893d6bd
4
changes/ticket28614
Normal file
4
changes/ticket28614
Normal file
@ -0,0 +1,4 @@
|
||||
o Major bugfixes (windows, startup):
|
||||
- When writing a consensus file to disk, always write in
|
||||
"binary" mode so that we can safely map it into memory later.
|
||||
Fixes part bug 28614; bugfix on 0.4.0.1-alpha.
|
@ -1991,7 +1991,7 @@ networkstatus_set_current_consensus(const char *consensus,
|
||||
waiting->set_at = now;
|
||||
waiting->dl_failed = 0;
|
||||
if (!from_cache) {
|
||||
write_bytes_to_file(unverified_fname, consensus, consensus_len, 0);
|
||||
write_bytes_to_file(unverified_fname, consensus, consensus_len, 1);
|
||||
}
|
||||
if (dl_certs)
|
||||
authority_certs_fetch_missing(c, now, source_dir);
|
||||
@ -2142,7 +2142,7 @@ networkstatus_set_current_consensus(const char *consensus,
|
||||
}
|
||||
|
||||
if (!from_cache) {
|
||||
write_bytes_to_file(consensus_fname, consensus, consensus_len, 0);
|
||||
write_bytes_to_file(consensus_fname, consensus, consensus_len, 1);
|
||||
}
|
||||
|
||||
warn_early_consensus(c, flavor, now);
|
||||
|
Loading…
Reference in New Issue
Block a user