diff options
author | Roger Dingledine <arma@torproject.org> | 2003-03-18 01:49:55 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-03-18 01:49:55 +0000 |
commit | 64e46988f65176c0a12700e24b7738b26fd2cdd0 (patch) | |
tree | edf4e223dcd1f233aa587cd4317cae5e226ac879 /src/or/connection_ap.c | |
parent | d5c42576a3cde4228ccef6503e92c2a02d8510c0 (diff) | |
download | tor-64e46988f65176c0a12700e24b7738b26fd2cdd0.tar tor-64e46988f65176c0a12700e24b7738b26fd2cdd0.tar.gz |
greatly simplify this notion of 'roles':
if your ORPort is non-zero then you must connect to all nodes
if your DirPort is non-zero then you must act like a directory server
svn:r192
Diffstat (limited to 'src/or/connection_ap.c')
-rw-r--r-- | src/or/connection_ap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection_ap.c b/src/or/connection_ap.c index 339c14137..9c9cfb149 100644 --- a/src/or/connection_ap.c +++ b/src/or/connection_ap.c @@ -4,7 +4,7 @@ #include "or.h" -extern int global_role; /* from main.c */ +extern or_options_t options; /* command-line and config-file options */ int connection_ap_process_inbuf(connection_t *conn) { @@ -221,7 +221,7 @@ int ap_handshake_establish_circuit(connection_t *conn, unsigned int *route, int if(!n_conn || n_conn->state != OR_CONN_STATE_OPEN) { /* not currently connected */ circ->n_addr = firsthop->addr; circ->n_port = firsthop->or_port; - if(global_role & ROLE_OR_CONNECT_ALL) { /* we would be connected if he were up. but he's not. */ + if(options.ORPort) { /* we would be connected if he were up. but he's not. */ log(LOG_DEBUG,"ap_handshake_establish_circuit(): Route's firsthop isn't connected."); circuit_close(circ); return -1; |