mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Merge branch 'tor-github/pr/1861'
This commit is contained in:
commit
fb281daf29
6
changes/ticket32873
Normal file
6
changes/ticket32873
Normal file
@ -0,0 +1,6 @@
|
||||
o Minor features (control port):
|
||||
- Return a descriptive error message from the 'GETINFO
|
||||
status/fresh-relay-descs' command on the control port.
|
||||
Previously, we returned a generic error of "Error
|
||||
generating descriptor". Closes ticket 32873. Patch by
|
||||
Neel Chauhan.
|
@ -1332,8 +1332,22 @@ getinfo_helper_events(control_connection_t *control_conn,
|
||||
}
|
||||
routerinfo_t *r;
|
||||
extrainfo_t *e;
|
||||
if (router_build_fresh_descriptor(&r, &e) < 0) {
|
||||
*errmsg = "Error generating descriptor";
|
||||
int result;
|
||||
if ((result = router_build_fresh_descriptor(&r, &e)) < 0) {
|
||||
switch (result) {
|
||||
case TOR_ROUTERINFO_ERROR_NO_EXT_ADDR:
|
||||
*errmsg = "Cannot get relay address while generating descriptor";
|
||||
break;
|
||||
case TOR_ROUTERINFO_ERROR_DIGEST_FAILED:
|
||||
*errmsg = "Key digest failed";
|
||||
break;
|
||||
case TOR_ROUTERINFO_ERROR_CANNOT_GENERATE:
|
||||
*errmsg = "Cannot generate router descriptor";
|
||||
break;
|
||||
default:
|
||||
*errmsg = "Error generating descriptor";
|
||||
break;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
size_t size = r->cache_info.signed_descriptor_len + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user