[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Isolate resolve.h usage in the modules that really need it.



commit a2c44a7a7e3810bb18121561f012830da696724d
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue Jul 10 13:36:45 2018 -0400

    Isolate resolve.h usage in the modules that really need it.
    
    (Almost none of Tor should actually need to touch the platform resolver.)
---
 src/app/config/config.c           | 1 +
 src/app/config/statefile.c        | 1 +
 src/core/mainloop/main.c          | 1 +
 src/core/or/or.h                  | 1 -
 src/feature/nodelist/routerlist.c | 1 +
 src/feature/rend/rendservice.c    | 1 +
 src/test/test_addr.c              | 1 +
 src/test/test_config.c            | 1 +
 src/test/test_connection.c        | 2 +-
 src/test/test_controller.c        | 1 +
 src/test/test_helpers.c           | 1 +
 src/test/test_options.c           | 1 +
 src/test/test_pt.c                | 1 +
 13 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/app/config/config.c b/src/app/config/config.c
index fa99fb0c8..1be1803f2 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -106,6 +106,7 @@
 #include "feature/client/transports.h"
 #include "feature/relay/ext_orport.h"
 #include "feature/dircommon/voting_schedule.h"
+#include "lib/net/resolve.h"
 #ifdef _WIN32
 #include <shlobj.h>
 #endif
diff --git a/src/app/config/statefile.c b/src/app/config/statefile.c
index 8eeef4502..656dc2eec 100644
--- a/src/app/config/statefile.c
+++ b/src/app/config/statefile.c
@@ -43,6 +43,7 @@
 #include "lib/sandbox/sandbox.h"
 #include "app/config/statefile.h"
 #include "lib/encoding/confline.h"
+#include "lib/net/resolve.h"
 
 #include "app/config/or_state_st.h"
 
diff --git a/src/core/mainloop/main.c b/src/core/mainloop/main.c
index c5773ddfc..048397a2d 100644
--- a/src/core/mainloop/main.c
+++ b/src/core/mainloop/main.c
@@ -116,6 +116,7 @@
 #include "lib/sandbox/sandbox.h"
 #include "lib/fs/lockfile.h"
 #include "lib/net/buffers_net.h"
+#include "lib/net/resolve.h"
 #include "lib/tls/tortls.h"
 #include "lib/evloop/compat_libevent.h"
 #include "lib/encoding/confline.h"
diff --git a/src/core/or/or.h b/src/core/or/or.h
index a9bef9404..2e419eefd 100644
--- a/src/core/or/or.h
+++ b/src/core/or/or.h
@@ -50,7 +50,6 @@
 #include "lib/malloc/util_malloc.h"
 #include "lib/net/address.h"
 #include "lib/net/inaddr.h"
-#include "lib/net/resolve.h"
 #include "lib/net/socket.h"
 #include "lib/string/compat_ctype.h"
 #include "lib/string/compat_string.h"
diff --git a/src/feature/nodelist/routerlist.c b/src/feature/nodelist/routerlist.c
index 12226fee6..8b54329da 100644
--- a/src/feature/nodelist/routerlist.c
+++ b/src/feature/nodelist/routerlist.c
@@ -123,6 +123,7 @@
 #include "lib/sandbox/sandbox.h"
 #include "feature/nodelist/torcert.h"
 #include "lib/math/fp.h"
+#include "lib/net/resolve.h"
 
 #include "feature/dirauth/dirvote.h"
 #include "feature/dirauth/mode.h"
diff --git a/src/feature/rend/rendservice.c b/src/feature/rend/rendservice.c
index da4a98b3d..1a99bd56e 100644
--- a/src/feature/rend/rendservice.c
+++ b/src/feature/rend/rendservice.c
@@ -37,6 +37,7 @@
 #include "feature/nodelist/routerparse.h"
 #include "feature/nodelist/routerset.h"
 #include "lib/encoding/confline.h"
+#include "lib/net/resolve.h"
 
 #include "core/or/cpath_build_state_st.h"
 #include "core/or/crypt_path_st.h"
diff --git a/src/test/test_addr.c b/src/test/test_addr.c
index c85779e52..a9004048a 100644
--- a/src/test/test_addr.c
+++ b/src/test/test_addr.c
@@ -10,6 +10,7 @@
 #include "test/test.h"
 #include "feature/client/addressmap.h"
 #include "test/log_test_helpers.h"
+#include "lib/net/resolve.h"
 
 #ifdef HAVE_SYS_UN_H
 #include <sys/un.h>
diff --git a/src/test/test_config.c b/src/test/test_config.c
index af3a8a7cf..393378b4c 100644
--- a/src/test/test_config.c
+++ b/src/test/test_config.c
@@ -10,6 +10,7 @@
 #define ROUTERSET_PRIVATE
 #include "core/or/or.h"
 #include "lib/net/address.h"
+#include "lib/net/resolve.h"
 #include "feature/client/addressmap.h"
 #include "feature/client/bridges.h"
 #include "core/or/circuitmux_ewma.h"
diff --git a/src/test/test_connection.c b/src/test/test_connection.c
index c423c6573..e716c83fe 100644
--- a/src/test/test_connection.c
+++ b/src/test/test_connection.c
@@ -20,6 +20,7 @@
 #include "feature/rend/rendcache.h"
 #include "feature/dircache/directory.h"
 #include "core/or/connection_or.h"
+#include "lib/net/resolve.h"
 
 #include "test/test_connection.h"
 #include "test/test_helpers.h"
@@ -899,4 +900,3 @@ struct testcase_t connection_tests[] = {
   { "failed_orconn_tracker", test_failed_orconn_tracker, TT_FORK, NULL, NULL },
   END_OF_TESTCASES
 };
-
diff --git a/src/test/test_controller.c b/src/test/test_controller.c
index 2ded04619..d0aa86844 100644
--- a/src/test/test_controller.c
+++ b/src/test/test_controller.c
@@ -14,6 +14,7 @@
 #include "feature/nodelist/nodelist.h"
 #include "test/test.h"
 #include "test/test_helpers.h"
+#include "lib/net/resolve.h"
 
 #include "feature/control/control_connection_st.h"
 #include "feature/dirclient/download_status_st.h"
diff --git a/src/test/test_helpers.c b/src/test/test_helpers.c
index c666bca59..c9138611d 100644
--- a/src/test/test_helpers.c
+++ b/src/test/test_helpers.c
@@ -24,6 +24,7 @@
 #include "core/or/relay.h"
 #include "feature/nodelist/routerlist.h"
 #include "lib/encoding/confline.h"
+#include "lib/net/resolve.h"
 
 #include "core/or/cell_st.h"
 #include "core/or/connection_st.h"
diff --git a/src/test/test_options.c b/src/test/test_options.c
index 396965401..4e890205b 100644
--- a/src/test/test_options.c
+++ b/src/test/test_options.c
@@ -21,6 +21,7 @@
 #include "lib/encoding/confline.h"
 #include "core/or/policies.h"
 #include "test/test_helpers.h"
+#include "lib/net/resolve.h"
 
 #define NS_MODULE test_options
 
diff --git a/src/test/test_pt.c b/src/test/test_pt.c
index dea3791da..d0160d114 100644
--- a/src/test/test_pt.c
+++ b/src/test/test_pt.c
@@ -19,6 +19,7 @@
 #include "test/test.h"
 #include "lib/process/subprocess.h"
 #include "lib/encoding/confline.h"
+#include "lib/net/resolve.h"
 
 #include "app/config/or_state_st.h"
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits