aboutsummaryrefslogtreecommitdiff
path: root/src/feature/dirparse/microdesc_parse.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2019-04-18 13:21:59 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2019-04-18 13:21:59 +0300
commit6a179b1072887c5b8e9a2f679a6faf5504bbf3e3 (patch)
treeab5d60168261ca67dfb06a3ed72dadc6aedf36d9 /src/feature/dirparse/microdesc_parse.c
parentc72f0cd5c77ffceb6f0275295c3446a908b17a75 (diff)
parent950d890f77d8f060702b100e6075d5083d536577 (diff)
downloadtor-6a179b1072887c5b8e9a2f679a6faf5504bbf3e3.tar.gz
tor-6a179b1072887c5b8e9a2f679a6faf5504bbf3e3.zip
Merge branch 'tor-github/pr/891' into maint-0.4.0
Diffstat (limited to 'src/feature/dirparse/microdesc_parse.c')
-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 3b11e65ca0..22cc1e272e 100644
--- a/src/feature/dirparse/microdesc_parse.c
+++ b/src/feature/dirparse/microdesc_parse.c
@@ -160,7 +160,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;
}