From: s0rlxmh0 Date: Mon, 2 May 2016 18:01:36 +0000 (-0400) Subject: (cherry-picked by nickm, with changes file from isis.) X-Git-Tag: tor-0.2.8.3-alpha~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=054d9398531b148d8b41c382da36c83c0381e09e;p=thirdparty%2Ftor.git (cherry-picked by nickm, with changes file from isis.) --- diff --git a/changes/bug18920 b/changes/bug18920 new file mode 100644 index 0000000000..1babfd6656 --- /dev/null +++ b/changes/bug18920 @@ -0,0 +1,5 @@ + o Minor bugfixes (controller, microdescriptors): + - Make GETINFO dir/status-vote/current/consensus conform to the control + specification by returning "551 Could not open cached consensus..." + when not caching consensuses. + Fixes bug 18920; bugfix on 0.2.2.6-alpha. diff --git a/src/or/control.c b/src/or/control.c index 655b4dd335..e06d7d28a2 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -2011,6 +2011,11 @@ getinfo_helper_dir(control_connection_t *control_conn, char *filename = get_datadir_fname("cached-consensus"); *answer = read_file_to_str(filename, RFTS_IGNORE_MISSING, NULL); tor_free(filename); + if (!*answer) { /* generate an error */ + *errmsg = "Could not open cached consensus. " + "Make sure FetchUselessDescriptors is set to 1."; + return -1; + } } } else if (!strcmp(question, "network-status")) { /* v1 */ routerlist_t *routerlist = router_get_routerlist();