diff options
author | teor <teor@torproject.org> | 2019-06-06 08:52:13 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-06-06 17:26:23 +1000 |
commit | 19bf5806adb80e513bb2707a1686216225fef420 (patch) | |
tree | 07cfe5b06c15617f369cf71f32069cceefb9d2aa /src/feature/dirauth/process_descs.c | |
parent | a4ea335a6906eb4f8f58b5cf458cf290d322d10f (diff) | |
download | tor-19bf5806adb80e513bb2707a1686216225fef420.tar.gz tor-19bf5806adb80e513bb2707a1686216225fef420.zip |
dirauth: Return a distinct status when formatting annotations fails
Adds ROUTER_AUTHDIR_BUG_ANNOTATIONS to was_router_added_t.
The out-of-order numbering is deliberate: it will be fixed by later commits
for 16564.
Fixes bug 30780; bugfix on 0.2.0.8-alpha.
Diffstat (limited to 'src/feature/dirauth/process_descs.c')
-rw-r--r-- | src/feature/dirauth/process_descs.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/feature/dirauth/process_descs.c b/src/feature/dirauth/process_descs.c index 17936add5f..a68d155651 100644 --- a/src/feature/dirauth/process_descs.c +++ b/src/feature/dirauth/process_descs.c @@ -556,9 +556,7 @@ dirserv_add_multiple_descriptors(const char *desc, size_t desclen, !general ? router_purpose_to_string(purpose) : "", !general ? "\n" : "")<0) { *msg = "Couldn't format annotations"; - /* XXX Not cool: we return -1 below, but (was_router_added_t)-1 is - * ROUTER_BAD_EI, which isn't what's gone wrong here. :( */ - return -1; + return ROUTER_AUTHDIR_BUG_ANNOTATIONS; } s = desc; |