aboutsummaryrefslogtreecommitdiff
path: root/src/feature/dirparse
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-04-03 13:53:06 -0400
committerNick Mathewson <nickm@torproject.org>2019-04-03 13:53:06 -0400
commit99b87d7ca48c5ed80aec5f24902843f72975bfea (patch)
treeca922e45eaa2b9209b51b3450b090efaaf697ea9 /src/feature/dirparse
parent4aa02d3c7abe84e99874f6bf7bfffb7b551935a5 (diff)
downloadtor-99b87d7ca48c5ed80aec5f24902843f72975bfea.tar.gz
tor-99b87d7ca48c5ed80aec5f24902843f72975bfea.zip
Even more diagnostic messages for bug 28223.
Try to figure out _where exactly_ we are first encountering NULs in microdescriptors, and what we are doing when that happens.
Diffstat (limited to 'src/feature/dirparse')
-rw-r--r--src/feature/dirparse/microdesc_parse.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/feature/dirparse/microdesc_parse.c b/src/feature/dirparse/microdesc_parse.c
index 5a75af3994..1e26901ce8 100644
--- a/src/feature/dirparse/microdesc_parse.c
+++ b/src/feature/dirparse/microdesc_parse.c
@@ -159,7 +159,22 @@ microdescs_parse_from_string(const char *s, const char *eos,
if (tokenize_string(area, s, start_of_next_microdesc, tokens,
microdesc_token_table, flags)) {
- log_warn(LD_DIR, "Unparseable microdescriptor");
+ const char *location;
+ switch (where) {
+ case SAVED_NOWHERE:
+ location = "download or generated string";
+ break;
+ case SAVED_IN_CACHE:
+ location = "cache";
+ break;
+ case SAVED_IN_JOURNAL:
+ location = "journal";
+ break;
+ default:
+ location = "unknown location";
+ break;
+ }
+ log_warn(LD_DIR, "Unparseable microdescriptor found in %s", location);
goto next;
}