summaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-07-18 21:47:04 +0000
committerNick Mathewson <nickm@torproject.org>2004-07-18 21:47:04 +0000
commit54c129d8dcbf27ec8f5117b46401a414fafe3b2e (patch)
tree65afe268dae997ef37b63729a68b91bea8aa1e60 /src/or/connection_or.c
parent87d0948903a8ce0802d4b94f98601ededdebd808 (diff)
downloadtor-54c129d8dcbf27ec8f5117b46401a414fafe3b2e.tar.gz
tor-54c129d8dcbf27ec8f5117b46401a414fafe3b2e.zip
abstract ORPort/SocksPort checks into server_mode(), proxy_mode(), clique_mode(), etc. Dont change underlying comments.
svn:r2054
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 094612a034..6cfc0e0df6 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -272,7 +272,7 @@ connection_tls_finish_handshake(connection_t *conn) {
connection_watch_events(conn, POLLIN);
log_fn(LOG_DEBUG,"tls handshake done. verifying.");
if (! tor_tls_peer_has_cert(conn->tls)) { /* It's an OP. */
- if (options.ORPort) { /* I'm an OR; good. */
+ if (server_mode()) { /* I'm an OR; good. */
conn->receiver_bucket = conn->bandwidth = DEFAULT_BANDWIDTH_OP;
return 0;
} else { /* Neither side sent a certificate: ouch. */
@@ -323,7 +323,7 @@ connection_tls_finish_handshake(connection_t *conn) {
connection_or_init_conn_from_router(conn,router);
}
- if (!options.ORPort) { /* If I'm an OP... */
+ if (!server_mode()) { /* If I'm an OP... */
conn->receiver_bucket = conn->bandwidth = DEFAULT_BANDWIDTH_OP;
}
directory_set_dirty();