diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-05-10 22:33:45 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-05-10 22:33:45 +0000 |
commit | 3893b3c7accc4bb8ead39b1343c4764303e4f799 (patch) | |
tree | 30260b6beaab9d5a68afe25d44a3e07eaa5eda55 /src | |
parent | d0c0d6c86a5e1754d71c1535443a2e4f6ea1ebb5 (diff) | |
download | tor-3893b3c7accc4bb8ead39b1343c4764303e4f799.tar.gz tor-3893b3c7accc4bb8ead39b1343c4764303e4f799.zip |
Patch for task 133
svn:r4189
Diffstat (limited to 'src')
-rw-r--r-- | src/or/routerlist.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 54801b5e96..c7a1c5c7ee 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -26,6 +26,7 @@ router_pick_directory_server_impl(int requireothers, int fascistfirewall, static trusted_dir_server_t * router_pick_trusteddirserver_impl(int requireother, int fascistfirewall); static void mark_all_trusteddirservers_up(void); +static int router_resolve(routerinfo_t *router); static int router_resolve_routerlist(routerlist_t *dir); /****************************************************************************/ @@ -929,6 +930,12 @@ router_load_single_router(const char *s, const char **msg) control_event_descriptors_changed(changed); smartlist_free(changed); } + + if (router_resolve(ri)<0) { + if (msg && !*msg) *msg = "Couldn't resolve router address."; + return 0; + } + log_fn(LOG_DEBUG, "Added router to list"); return 1; } |