summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-05-02 14:02:15 -0400
committerNick Mathewson <nickm@torproject.org>2016-05-02 14:02:15 -0400
commit8340becd39920ef6363ab6c7d494cc7abf70c202 (patch)
tree634a3550090ddeb4e5672b036b626074a1399d5e /src
parentb2083cba9eb842ae7e85063d5751ddddc7302acb (diff)
parent054d9398531b148d8b41c382da36c83c0381e09e (diff)
downloadtor-8340becd39920ef6363ab6c7d494cc7abf70c202.tar.gz
tor-8340becd39920ef6363ab6c7d494cc7abf70c202.zip
Merge branch 'maint-0.2.8'
Diffstat (limited to 'src')
-rw-r--r--src/or/control.c5
1 files changed, 5 insertions, 0 deletions
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();