summaryrefslogtreecommitdiff
path: root/src/or/onion.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-11-06 05:18:11 +0000
committerRoger Dingledine <arma@torproject.org>2004-11-06 05:18:11 +0000
commit6c61ed4fb5d33a8c51ff342165a26ac70765dd26 (patch)
tree6a767b637d976bf392a275e99386798bbf094e74 /src/or/onion.c
parentf490e5cdb6a60779ddadfba3dd022ba904c00b43 (diff)
downloadtor-6c61ed4fb5d33a8c51ff342165a26ac70765dd26.tar.gz
tor-6c61ed4fb5d33a8c51ff342165a26ac70765dd26.zip
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/onion.c')
-rw-r--r--src/or/onion.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/or/onion.c b/src/or/onion.c
index c5431e0fdc..9def03cd27 100644
--- a/src/or/onion.c
+++ b/src/or/onion.c
@@ -10,8 +10,6 @@
#include "or.h"
-extern or_options_t options; /**< command-line and config-file options */
-
struct onion_queue_t {
circuit_t *circ;
struct onion_queue_t *next;
@@ -44,7 +42,7 @@ int onion_pending_add(circuit_t *circ) {
tor_assert(ol_list);
tor_assert(!ol_tail->next);
- if(ol_length >= options.MaxOnionsPending) {
+ if(ol_length >= get_options()->MaxOnionsPending) {
log_fn(LOG_WARN,"Already have %d onions queued. Closing.", ol_length);
tor_free(tmp);
return -1;