summaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-08-22 22:58:38 +0000
committerRoger Dingledine <arma@torproject.org>2005-08-22 22:58:38 +0000
commit23ed3c97862e405002ff5a672e33386fbb59a3ae (patch)
treed6548079325be43364de692b7f9c7c428205c8c2 /src/or/circuitbuild.c
parent676b330eb2b0923d1ee6c0307b3a155e6818bac0 (diff)
downloadtor-23ed3c97862e405002ff5a672e33386fbb59a3ae.tar.gz
tor-23ed3c97862e405002ff5a672e33386fbb59a3ae.zip
whoops, avoid printing a null string sometimes
svn:r4815
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r--src/or/circuitbuild.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 180452f905..900870ccb9 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -535,13 +535,16 @@ circuit_send_next_onion_skin(circuit_t *circ)
log(LOG_NOTICE,"Tor has successfully opened a circuit. Looks like it's working.");
if (server_mode(options) && !check_whether_orport_reachable()) {
char dirbuf[128];
- if (options->DirPort)
- tor_snprintf(dirbuf, sizeof(dirbuf), " and DirPort %s:%d ",
- options->Address, options->DirPort);
- log(LOG_NOTICE,"Now checking whether ORPort %s:%d%s%s reachable... (this may take several minutes)",
- options->Address, options->ORPort,
- options->DirPort ? dirbuf : "",
- options->DirPort ? "are" : "is");
+ routerinfo_t *me = router_get_my_routerinfo();
+ if (me) {
+ if (me->dir_port)
+ tor_snprintf(dirbuf, sizeof(dirbuf), " and DirPort %s:%d",
+ me->address, me->dir_port);
+ log(LOG_NOTICE,"Now checking whether ORPort %s:%d%s %s reachable... (this may take several minutes)",
+ me->address, me->or_port,
+ me->dir_port ? dirbuf : "",
+ me->dir_port ? "are" : "is");
+ }
}
}
circuit_rep_hist_note_result(circ);