Merge branch 'tor-github/pr/1319'

This commit is contained in:
David Goulet 2019-09-12 13:53:59 -04:00
commit 286b129b09
25 changed files with 28 additions and 22 deletions

4
changes/ticket31626 Normal file
View File

@ -0,0 +1,4 @@
o Code simplification and refactoring:
- Move our backend logic for working with configuration and state
files into a lower-level library, since in no longer depends on
any tor-specific functionality. Closes ticket 31626.

View File

@ -61,7 +61,7 @@
#define CONFIG_PRIVATE
#include "core/or/or.h"
#include "app/config/config.h"
#include "app/config/confparse.h"
#include "lib/confmgt/confparse.h"
#include "app/config/statefile.h"
#include "app/main/main.h"
#include "app/main/subsysmgr.h"

View File

@ -32,7 +32,7 @@
#include "core/or/or.h"
#include "core/or/circuitstats.h"
#include "app/config/config.h"
#include "app/config/confparse.h"
#include "lib/confmgt/confparse.h"
#include "core/mainloop/mainloop.h"
#include "core/mainloop/netstatus.h"
#include "core/mainloop/connection.h"

View File

@ -9,7 +9,6 @@ endif
# ADD_C_FILE: INSERT SOURCES HERE.
LIBTOR_APP_A_SOURCES = \
src/app/config/config.c \
src/app/config/confparse.c \
src/app/config/statefile.c \
src/app/main/main.c \
src/app/main/shutdown.c \
@ -214,7 +213,6 @@ src_core_libtor_app_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
# ADD_C_FILE: INSERT HEADERS HERE.
noinst_HEADERS += \
src/app/config/config.h \
src/app/config/confparse.h \
src/app/config/or_options_st.h \
src/app/config/or_state_st.h \
src/app/config/statefile.h \

View File

@ -30,7 +30,7 @@
#include "core/or/or.h"
#include "app/config/config.h"
#include "app/config/confparse.h"
#include "lib/confmgt/confparse.h"
#include "core/crypto/hs_ntor.h"
#include "core/crypto/onion_crypto.h"
#include "core/crypto/onion_fast.h"

View File

@ -29,7 +29,7 @@
#include "core/or/circuitbuild.h"
#include "core/or/circuitstats.h"
#include "app/config/config.h"
#include "app/config/confparse.h"
#include "lib/confmgt/confparse.h"
#include "feature/control/control_events.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "core/mainloop/mainloop.h"

View File

@ -114,7 +114,7 @@
#include "core/or/or.h"
#include "app/config/config.h"
#include "app/config/confparse.h"
#include "lib/confmgt/confparse.h"
#include "app/config/statefile.h"
#include "core/mainloop/connection.h"
#include "core/mainloop/mainloop.h"

View File

@ -13,7 +13,7 @@
#include "core/or/or.h"
#include "app/config/config.h"
#include "app/config/confparse.h"
#include "lib/confmgt/confparse.h"
#include "app/main/main.h"
#include "core/mainloop/connection.h"
#include "core/or/circuitbuild.h"

View File

@ -90,7 +90,7 @@
#include "core/or/or.h"
#include "feature/dirauth/shared_random.h"
#include "app/config/config.h"
#include "app/config/confparse.h"
#include "lib/confmgt/confparse.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
#include "feature/nodelist/networkstatus.h"

View File

@ -12,7 +12,7 @@
#include "core/or/or.h"
#include "app/config/config.h"
#include "app/config/confparse.h"
#include "lib/confmgt/confparse.h"
#include "lib/crypt_ops/crypto_util.h"
#include "feature/dirauth/dirvote.h"
#include "feature/nodelist/networkstatus.h"

View File

@ -29,7 +29,7 @@
#include "lib/evloop/token_bucket.h"
#include "hs_dos.h"
#include "feature/hs/hs_dos.h"
/* Default value of the allowed INTRODUCE2 cell rate per second. Above that
* value per second, the introduction is denied. */

View File

@ -7,3 +7,5 @@ lib/encoding/*.h
lib/log/*.h
lib/malloc/*.h
lib/string/*.h
lib/testsupport/*.h
ext/*.h

View File

@ -23,7 +23,7 @@
#define CONFPARSE_PRIVATE
#include "orconfig.h"
#include "app/config/confparse.h"
#include "lib/confmgt/confparse.h"
#include "lib/confmgt/structvar.h"
#include "lib/confmgt/unitparse.h"

View File

@ -6,6 +6,7 @@ endif
# ADD_C_FILE: INSERT SOURCES HERE.
src_lib_libtor_confmgt_a_SOURCES = \
src/lib/confmgt/confparse.c \
src/lib/confmgt/structvar.c \
src/lib/confmgt/type_defs.c \
src/lib/confmgt/typedvar.c \
@ -18,6 +19,7 @@ src_lib_libtor_confmgt_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
# ADD_C_FILE: INSERT HEADERS HERE.
noinst_HEADERS += \
src/lib/confmgt/confparse.h \
src/lib/confmgt/structvar.h \
src/lib/confmgt/type_defs.h \
src/lib/confmgt/typedvar.h \

View File

@ -4,7 +4,7 @@
#include "core/or/or.h"
#include "test/test.h"
#include "test_helpers.h"
#include "test/test_helpers.h"
#include "test/log_test_helpers.h"
#define OCIRC_EVENT_PRIVATE

View File

@ -16,7 +16,7 @@
#include "core/or/circuitmux_ewma.h"
#include "core/or/circuitbuild.h"
#include "app/config/config.h"
#include "app/config/confparse.h"
#include "lib/confmgt/confparse.h"
#include "core/mainloop/connection.h"
#include "core/or/connection_edge.h"
#include "test/test.h"

View File

@ -13,7 +13,7 @@
#include "core/or/or.h"
#include "lib/encoding/confline.h"
#include "app/config/confparse.h"
#include "lib/confmgt/confparse.h"
#include "test/test.h"
#include "test/log_test_helpers.h"

View File

@ -14,7 +14,7 @@
#include "core/or/or.h"
#include "lib/encoding/confline.h"
#include "feature/nodelist/routerset.h"
#include "app/config/confparse.h"
#include "lib/confmgt/confparse.h"
#include "test/test.h"
#include "test/log_test_helpers.h"

View File

@ -26,7 +26,7 @@
#include "core/or/or.h"
#include "app/config/config.h"
#include "app/config/confparse.h"
#include "lib/confmgt/confparse.h"
#include "core/mainloop/connection.h"
#include "core/or/relay.h"
#include "core/or/versions.h"

View File

@ -11,7 +11,7 @@
#include "feature/client/addressmap.h"
#include "app/config/config.h"
#include "app/config/confparse.h"
#include "lib/confmgt/confparse.h"
#include "core/mainloop/connection.h"
#include "core/or/connection_edge.h"
#include "feature/nodelist/nodelist.h"

View File

@ -18,7 +18,7 @@
#include "core/or/circuitlist.h"
#include "core/or/circuitbuild.h"
#include "app/config/config.h"
#include "app/config/confparse.h"
#include "lib/confmgt/confparse.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "feature/dircommon/directory.h"
#include "feature/dirclient/dirclient.h"

View File

@ -16,7 +16,7 @@
#include "lib/buf/buffers.h"
#include "app/config/config.h"
#include "app/config/confparse.h"
#include "lib/confmgt/confparse.h"
#include "app/main/subsysmgr.h"
#include "core/mainloop/connection.h"
#include "lib/crypt_ops/crypto_rand.h"

View File

@ -5,7 +5,7 @@
#define CONFIG_PRIVATE
#include "core/or/or.h"
#include "app/config/confparse.h"
#include "lib/confmgt/confparse.h"
#include "app/config/config.h"
#include "test/test.h"
#include "lib/geoip/geoip.h"

View File

@ -11,7 +11,7 @@
#define PROCESS_PRIVATE
#include "core/or/or.h"
#include "app/config/config.h"
#include "app/config/confparse.h"
#include "lib/confmgt/confparse.h"
#include "feature/control/control.h"
#include "feature/control/control_events.h"
#include "feature/client/transports.h"