diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-11-01 13:22:16 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-11-01 13:22:16 -0400 |
commit | ef25f957e7912491ced116733e699ee341f2dadc (patch) | |
tree | 5764fb29363c8a75f2e34833caee590c7f2eeb54 /src/or/main.c | |
parent | 9635843342cb98340a965c40d9afcbe69c8d12df (diff) | |
parent | 221f5238aed47f4436916a1da5c6f0423c7fe3e1 (diff) | |
download | tor-ef25f957e7912491ced116733e699ee341f2dadc.tar.gz tor-ef25f957e7912491ced116733e699ee341f2dadc.zip |
Merge branch 'tor_api_squashed'
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/or/main.c b/src/or/main.c index 057b31a79f..97dcdcb3c2 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -105,6 +105,8 @@ #include "shared_random.h" #include "statefile.h" #include "status.h" +#include "tor_api.h" +#include "tor_api_internal.h" #include "util_process.h" #include "ext_orport.h" #ifdef USE_DMALLOC @@ -3795,14 +3797,16 @@ sandbox_init_filter(void) return cfg; } -/** Main entry point for the Tor process. Called from main(). */ -/* This function is distinct from main() only so we can link main.c into - * the unittest binary without conflicting with the unittests' main. */ +/* Main entry point for the Tor process. Called from tor_main(), and by + * anybody embedding Tor. */ int -tor_main(int argc, char *argv[]) +tor_run_main(const tor_main_configuration_t *tor_cfg) { int result = 0; + int argc = tor_cfg->argc; + char **argv = tor_cfg->argv; + #ifdef _WIN32 #ifndef HeapEnableTerminationOnCorruption #define HeapEnableTerminationOnCorruption 1 |