summaryrefslogtreecommitdiff
path: root/src/or/onion.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-02-29 01:31:33 +0000
committerRoger Dingledine <arma@torproject.org>2004-02-29 01:31:33 +0000
commit4716d4d8715f25ed2536f3c6fb35e5d3392669c4 (patch)
tree63d6554d99dbb5aac78d2ee75327f45a6bf70769 /src/or/onion.c
parentb4338ce704efbc1f9d2ade37e21dfed9a2465e66 (diff)
downloadtor-4716d4d8715f25ed2536f3c6fb35e5d3392669c4.tar.gz
tor-4716d4d8715f25ed2536f3c6fb35e5d3392669c4.zip
bugfix: only warn about an unrouter router after we've fetched a directory
svn:r1178
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;
}