summaryrefslogtreecommitdiff
path: root/src/or/cpuworker.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/cpuworker.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/cpuworker.c')
-rw-r--r--src/or/cpuworker.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c
index c3d2aa329c..84f42d06f1 100644
--- a/src/or/cpuworker.c
+++ b/src/or/cpuworker.c
@@ -11,7 +11,6 @@
**/
#include "or.h"
-extern or_options_t options; /* command-line and config-file options */
/** The maximum number of cpuworker processes we will keep around. */
#define MAX_CPUWORKERS 16
@@ -302,7 +301,7 @@ static int spawn_cpuworker(void) {
* or kill idle ones.
*/
static void spawn_enough_cpuworkers(void) {
- int num_cpuworkers_needed = options.NumCpus;
+ int num_cpuworkers_needed = get_options()->NumCpus;
if(num_cpuworkers_needed < MIN_CPUWORKERS)
num_cpuworkers_needed = MIN_CPUWORKERS;