summaryrefslogtreecommitdiff
path: root/src/feature/nodelist
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2019-04-25 01:50:13 +0200
committerAlexander Færøy <ahf@torproject.org>2019-04-25 01:59:37 +0200
commit04290724957e14710646a5c28bd3230710466c92 (patch)
tree5f1e60bc66e560daf81ef8d3c2a17253e8cade14 /src/feature/nodelist
parent24b68b4777225436c1f5f820e79a6a76ee973313 (diff)
downloadtor-04290724957e14710646a5c28bd3230710466c92.tar.gz
tor-04290724957e14710646a5c28bd3230710466c92.zip
Lower log level of unlink() errors in networkstatus_set_current_consensus().
In this patch we lower the log level of the failures for the three calls to unlink() in networkstatus_set_current_consensus(). These errors might trigger on Windows because the memory mapped consensus file keeps the file in open state even after we have close()'d it. Windows will then error on the unlink() call with a "Permission denied" error. The consequences of ignoring these errors is that we leave an unused file around on the file-system, which is an easier way to fix this problem right now than refactoring networkstatus_set_current_consensus(). See: https://bugs.torproject.org/29930
Diffstat (limited to 'src/feature/nodelist')
-rw-r--r--src/feature/nodelist/networkstatus.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/feature/nodelist/networkstatus.c b/src/feature/nodelist/networkstatus.c
index a988f700f3..24e3b212f0 100644
--- a/src/feature/nodelist/networkstatus.c
+++ b/src/feature/nodelist/networkstatus.c
@@ -2033,9 +2033,9 @@ networkstatus_set_current_consensus(const char *consensus,
* latest consensus. */
if (was_waiting_for_certs && from_cache)
if (unlink(unverified_fname) != 0) {
- log_warn(LD_FS,
- "Failed to unlink %s: %s",
- unverified_fname, strerror(errno));
+ log_debug(LD_FS,
+ "Failed to unlink %s: %s",
+ unverified_fname, strerror(errno));
}
}
goto done;
@@ -2048,9 +2048,9 @@ networkstatus_set_current_consensus(const char *consensus,
}
if (was_waiting_for_certs && (r < -1) && from_cache) {
if (unlink(unverified_fname) != 0) {
- log_warn(LD_FS,
- "Failed to unlink %s: %s",
- unverified_fname, strerror(errno));
+ log_debug(LD_FS,
+ "Failed to unlink %s: %s",
+ unverified_fname, strerror(errno));
}
}
goto done;
@@ -2115,9 +2115,9 @@ networkstatus_set_current_consensus(const char *consensus,
waiting->set_at = 0;
waiting->dl_failed = 0;
if (unlink(unverified_fname) != 0) {
- log_warn(LD_FS,
- "Failed to unlink %s: %s",
- unverified_fname, strerror(errno));
+ log_debug(LD_FS,
+ "Failed to unlink %s: %s",
+ unverified_fname, strerror(errno));
}
}