diff options
author | Roger Dingledine <arma@torproject.org> | 2004-11-06 05:18:11 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-11-06 05:18:11 +0000 |
commit | 6c61ed4fb5d33a8c51ff342165a26ac70765dd26 (patch) | |
tree | 6a767b637d976bf392a275e99386798bbf094e74 /src/or/relay.c | |
parent | f490e5cdb6a60779ddadfba3dd022ba904c00b43 (diff) | |
download | tor-6c61ed4fb5d33a8c51ff342165a26ac70765dd26.tar tor-6c61ed4fb5d33a8c51ff342165a26ac70765dd26.tar.gz |
Make options no longer a global variable.
Now we can try setting an option but back out if it fails to parse, or
if it's disallowed (e.g. changing RunAsDaemon from 1 to 0).
Use parse_line_from_str rather than parse_line_from_file.
svn:r2692
Diffstat (limited to 'src/or/relay.c')
-rw-r--r-- | src/or/relay.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index 2c256548c..73c5db0f5 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -10,8 +10,6 @@ #include "or.h" -extern or_options_t options; /* command-line and config-file options */ - static int relay_crypt(circuit_t *circ, cell_t *cell, int cell_direction, crypt_path_t **layer_hint, char *recognized); static connection_t *relay_lookup_conn(circuit_t *circ, cell_t *cell, int cell_direction); @@ -546,7 +544,7 @@ connection_edge_process_relay_cell_not_open( conn->state = AP_CONN_STATE_CIRCUIT_WAIT; circuit_detach_stream(circ,conn); tor_assert(circ->timestamp_dirty); - circ->timestamp_dirty -= options.NewCircuitPeriod; + circ->timestamp_dirty -= get_options()->NewCircuitPeriod; /* make sure not to expire/retry the stream quite yet */ conn->timestamp_lastread = time(NULL); if(connection_ap_handshake_attach_circuit(conn) >= 0) |