aboutsummaryrefslogtreecommitdiff
path: root/src/feature
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-20 15:19:43 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-21 09:14:06 -0400
commitc7ce6b9821be22e734b79e07e318f2bfba32722d (patch)
tree0582d70285c6fcd33f9804af6684f8de27273c36 /src/feature
parent98ef3e82e48c2d57c09d5f551b72e7d6bfe5347a (diff)
downloadtor-c7ce6b9821be22e734b79e07e318f2bfba32722d.tar.gz
tor-c7ce6b9821be22e734b79e07e318f2bfba32722d.zip
Split main.c into main.c and mainloop.c
The main.c code is responsible for initialization and shutdown; the mainloop.c code is responsible for running the main loop of Tor. Splitting the "generic event loop" part of mainloop.c from the event-loop-specific part is not done as part of this patch.
Diffstat (limited to 'src/feature')
-rw-r--r--src/feature/client/dnsserv.c2
-rw-r--r--src/feature/client/entrynodes.c2
-rw-r--r--src/feature/control/control.c3
-rw-r--r--src/feature/dirauth/voteflags.c2
-rw-r--r--src/feature/dircache/directory.c2
-rw-r--r--src/feature/hibernate/hibernate.c2
-rw-r--r--src/feature/hs/hs_service.c2
-rw-r--r--src/feature/nodelist/authcert.c2
-rw-r--r--src/feature/nodelist/fmt_routerstatus.c2
-rw-r--r--src/feature/nodelist/networkstatus.c2
-rw-r--r--src/feature/nodelist/nodelist.c2
-rw-r--r--src/feature/nodelist/routerlist.c2
-rw-r--r--src/feature/relay/dns.c2
-rw-r--r--src/feature/relay/ext_orport.c2
-rw-r--r--src/feature/relay/router.c3
-rw-r--r--src/feature/rend/rendclient.c2
-rw-r--r--src/feature/rend/rendservice.c2
17 files changed, 19 insertions, 17 deletions
diff --git a/src/feature/client/dnsserv.c b/src/feature/client/dnsserv.c
index 31cc3eff79..ea4951f915 100644
--- a/src/feature/client/dnsserv.c
+++ b/src/feature/client/dnsserv.c
@@ -27,7 +27,7 @@
#include "core/mainloop/connection.h"
#include "core/or/connection_edge.h"
#include "feature/control/control.h"
-#include "core/mainloop/main.h"
+#include "core/mainloop/mainloop.h"
#include "core/or/policies.h"
#include "feature/control/control_connection_st.h"
diff --git a/src/feature/client/entrynodes.c b/src/feature/client/entrynodes.c
index f16de722df..94bb011fb9 100644
--- a/src/feature/client/entrynodes.c
+++ b/src/feature/client/entrynodes.c
@@ -127,7 +127,7 @@
#include "lib/crypt_ops/crypto_rand.h"
#include "feature/dircache/directory.h"
#include "feature/client/entrynodes.h"
-#include "core/mainloop/main.h"
+#include "core/mainloop/mainloop.h"
#include "feature/nodelist/microdesc.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/nodelist.h"
diff --git a/src/feature/control/control.c b/src/feature/control/control.c
index 5e49b48e7e..b5a0dfeafe 100644
--- a/src/feature/control/control.c
+++ b/src/feature/control/control.c
@@ -65,7 +65,8 @@
#include "feature/hs/hs_cache.h"
#include "feature/hs/hs_common.h"
#include "feature/hs/hs_control.h"
-#include "core/mainloop/main.h"
+#include "app/main/main.h"
+#include "core/mainloop/mainloop.h"
#include "feature/nodelist/microdesc.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/nodelist.h"
diff --git a/src/feature/dirauth/voteflags.c b/src/feature/dirauth/voteflags.c
index d5ace761d4..4a24dcb50d 100644
--- a/src/feature/dirauth/voteflags.c
+++ b/src/feature/dirauth/voteflags.c
@@ -14,7 +14,7 @@
#include "feature/dirauth/voteflags.h"
#include "app/config/config.h"
-#include "core/mainloop/main.h"
+#include "core/mainloop/mainloop.h"
#include "core/or/policies.h"
#include "feature/dirauth/bwauth.h"
#include "feature/dirauth/reachability.h"
diff --git a/src/feature/dircache/directory.c b/src/feature/dircache/directory.c
index 34305bf667..7066e92c22 100644
--- a/src/feature/dircache/directory.c
+++ b/src/feature/dircache/directory.c
@@ -30,7 +30,7 @@
#include "feature/hs/hs_common.h"
#include "feature/hs/hs_control.h"
#include "feature/hs/hs_client.h"
-#include "core/mainloop/main.h"
+#include "core/mainloop/mainloop.h"
#include "feature/nodelist/microdesc.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/nodelist.h"
diff --git a/src/feature/hibernate/hibernate.c b/src/feature/hibernate/hibernate.c
index d37ba5b8b1..02b05ca3a2 100644
--- a/src/feature/hibernate/hibernate.c
+++ b/src/feature/hibernate/hibernate.c
@@ -38,7 +38,7 @@ hibernating, phase 2:
#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "feature/hibernate/hibernate.h"
-#include "core/mainloop/main.h"
+#include "core/mainloop/mainloop.h"
#include "feature/relay/router.h"
#include "app/config/statefile.h"
#include "lib/evloop/compat_libevent.h"
diff --git a/src/feature/hs/hs_service.c b/src/feature/hs/hs_service.c
index 83607e6245..28e3f73340 100644
--- a/src/feature/hs/hs_service.c
+++ b/src/feature/hs/hs_service.c
@@ -20,7 +20,7 @@
#include "lib/crypt_ops/crypto_ope.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "feature/dircache/directory.h"
-#include "core/mainloop/main.h"
+#include "core/mainloop/mainloop.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/nodelist.h"
#include "core/or/relay.h"
diff --git a/src/feature/nodelist/authcert.c b/src/feature/nodelist/authcert.c
index c4a0375909..74a6c5b5fa 100644
--- a/src/feature/nodelist/authcert.c
+++ b/src/feature/nodelist/authcert.c
@@ -20,7 +20,7 @@
#include "app/config/config.h"
#include "core/mainloop/connection.h"
-#include "core/mainloop/main.h"
+#include "core/mainloop/mainloop.h"
#include "core/or/policies.h"
#include "feature/client/bridges.h"
#include "feature/dircache/directory.h"
diff --git a/src/feature/nodelist/fmt_routerstatus.c b/src/feature/nodelist/fmt_routerstatus.c
index d97d4ae6e3..e70aeb2950 100644
--- a/src/feature/nodelist/fmt_routerstatus.c
+++ b/src/feature/nodelist/fmt_routerstatus.c
@@ -29,7 +29,7 @@
/* #include "feature/dircache/dirserv.h" */
/* #include "feature/hibernate/hibernate.h" */
/* #include "feature/dirauth/keypin.h" */
-/* #include "core/mainloop/main.h" */
+/* #include "core/mainloop/mainloop.h" */
/* #include "feature/nodelist/microdesc.h" */
/* #include "feature/nodelist/networkstatus.h" */
/* #include "feature/nodelist/nodelist.h" */
diff --git a/src/feature/nodelist/networkstatus.c b/src/feature/nodelist/networkstatus.c
index c5d8d42c42..c64c5176e5 100644
--- a/src/feature/nodelist/networkstatus.c
+++ b/src/feature/nodelist/networkstatus.c
@@ -57,7 +57,7 @@
#include "core/or/dos.h"
#include "feature/client/entrynodes.h"
#include "feature/hibernate/hibernate.h"
-#include "core/mainloop/main.h"
+#include "core/mainloop/mainloop.h"
#include "feature/nodelist/microdesc.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/nodelist.h"
diff --git a/src/feature/nodelist/nodelist.c b/src/feature/nodelist/nodelist.c
index 9cde06f37e..ac9821d827 100644
--- a/src/feature/nodelist/nodelist.c
+++ b/src/feature/nodelist/nodelist.c
@@ -52,7 +52,7 @@
#include "feature/stats/geoip.h"
#include "feature/hs/hs_common.h"
#include "feature/hs/hs_client.h"
-#include "core/mainloop/main.h"
+#include "core/mainloop/mainloop.h"
#include "feature/nodelist/microdesc.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/nodelist.h"
diff --git a/src/feature/nodelist/routerlist.c b/src/feature/nodelist/routerlist.c
index bfa1c85c09..9a4e48b076 100644
--- a/src/feature/nodelist/routerlist.c
+++ b/src/feature/nodelist/routerlist.c
@@ -64,7 +64,7 @@
#include "app/config/config.h"
#include "core/mainloop/connection.h"
-#include "core/mainloop/main.h"
+#include "core/mainloop/mainloop.h"
#include "core/or/policies.h"
#include "feature/client/bridges.h"
#include "feature/control/control.h"
diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c
index 48319b47c8..6e9be5e2e7 100644
--- a/src/feature/relay/dns.c
+++ b/src/feature/relay/dns.c
@@ -58,7 +58,7 @@
#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "feature/relay/dns.h"
-#include "core/mainloop/main.h"
+#include "core/mainloop/mainloop.h"
#include "core/or/policies.h"
#include "core/or/relay.h"
#include "feature/relay/router.h"
diff --git a/src/feature/relay/ext_orport.c b/src/feature/relay/ext_orport.c
index 7de57ac65d..3607bdede4 100644
--- a/src/feature/relay/ext_orport.c
+++ b/src/feature/relay/ext_orport.c
@@ -25,7 +25,7 @@
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
#include "feature/relay/ext_orport.h"
-#include "core/mainloop/main.h"
+#include "core/mainloop/mainloop.h"
#include "core/proto/proto_ext_or.h"
#include "core/or/or_connection_st.h"
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c
index 8029edfb75..447c21e897 100644
--- a/src/feature/relay/router.c
+++ b/src/feature/relay/router.c
@@ -22,7 +22,8 @@
#include "feature/relay/dns.h"
#include "feature/stats/geoip.h"
#include "feature/hibernate/hibernate.h"
-#include "core/mainloop/main.h"
+#include "app/main/main.h"
+#include "core/mainloop/mainloop.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/nodelist.h"
#include "core/or/policies.h"
diff --git a/src/feature/rend/rendclient.c b/src/feature/rend/rendclient.c
index 0efeb3b77c..a2b494bd27 100644
--- a/src/feature/rend/rendclient.c
+++ b/src/feature/rend/rendclient.c
@@ -23,7 +23,7 @@
#include "feature/hs/hs_circuit.h"
#include "feature/hs/hs_client.h"
#include "feature/hs/hs_common.h"
-#include "core/mainloop/main.h"
+#include "core/mainloop/mainloop.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/nodelist.h"
#include "core/or/relay.h"
diff --git a/src/feature/rend/rendservice.c b/src/feature/rend/rendservice.c
index f9508f4647..ceb4d958d7 100644
--- a/src/feature/rend/rendservice.c
+++ b/src/feature/rend/rendservice.c
@@ -22,7 +22,7 @@
#include "feature/dircache/directory.h"
#include "feature/hs/hs_common.h"
#include "feature/hs/hs_config.h"
-#include "core/mainloop/main.h"
+#include "core/mainloop/mainloop.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/nodelist.h"
#include "core/or/policies.h"