summaryrefslogtreecommitdiff
path: root/src/or/onion.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/onion.c')
-rw-r--r--src/or/onion.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/or/onion.c b/src/or/onion.c
index 13e22dd191..4b1969560a 100644
--- a/src/or/onion.c
+++ b/src/or/onion.c
@@ -157,6 +157,8 @@ int onionskin_answer(circuit_t *circ, unsigned char *payload, unsigned char *key
return 0;
}
+extern int has_fetched_directory;
+
static void add_nickname_list_to_smartlist(smartlist_t *sl, char *list) {
char *start,*end;
char nick[MAX_NICKNAME_LEN];
@@ -170,10 +172,14 @@ static void add_nickname_list_to_smartlist(smartlist_t *sl, char *list) {
memcpy(nick,start,end-start);
nick[end-start] = 0; /* null terminate it */
router = router_get_by_nickname(nick);
- if(router && router->is_running)
- smartlist_add(sl,router);
- else
- log_fn(LOG_WARN,"Nickname list includes '%s' which isn't a known router.",nick);
+ if (router) {
+ if (router->is_running)
+ smartlist_add(sl,router);
+ else
+ log_fn(LOG_WARN,"Nickname list includes '%s' which is known but down.",nick);
+ } else
+ log_fn(has_fetched_directory ? LOG_WARN : LOG_INFO,
+ "Nickname list includes '%s' which isn't a known router.",nick);
while(isspace(*end) || *end==',') end++;
start = end;
}