diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-10-09 20:44:47 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-10-09 20:44:47 +0000 |
commit | 8b71a76dd322ab0043871cac3c299cd660471121 (patch) | |
tree | 3e81cd2444e9335ec592a5b70725fb43d40a734f /src/or/connection_edge.c | |
parent | 010fd50c365f90f98e9e8ec243a573aba4c53cfa (diff) | |
download | tor-8b71a76dd322ab0043871cac3c299cd660471121.tar.gz tor-8b71a76dd322ab0043871cac3c299cd660471121.zip |
r15598@catbus: nickm | 2007-10-09 16:37:35 -0400
Turn all "Is DirPort nonzero? Because if it is, we must be a directory" logic into calls to dirserver_mode().
svn:r11817
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 647bdac976..da78784d80 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -2283,8 +2283,7 @@ connection_exit_begin_conn(cell_t *cell, circuit_t *circ) } } else if (rh.command == RELAY_COMMAND_BEGIN_DIR) { or_options_t *options = get_options(); - port = options->DirPort; /* not actually used to open a connection */ - if (!port || circ->purpose != CIRCUIT_PURPOSE_OR) { + if (!dirserver_mode(options) || circ->purpose != CIRCUIT_PURPOSE_OR) { end_payload[0] = END_STREAM_REASON_NOTDIRECTORY; relay_send_command_from_edge(rh.stream_id, circ, RELAY_COMMAND_END, end_payload, 1, NULL); |