[tor-commits] [tor/master] Rename circuit_get_global_list to remove trailing _

nickm at torproject.org nickm at torproject.org
Thu Aug 15 19:52:04 UTC 2013


commit a3ffa1f76edbfdf091e50579c11d34166ec0551a
Author: Nick Mathewson <nickm at torproject.org>
Date:   Thu Aug 15 15:37:23 2013 -0400

    Rename circuit_get_global_list to remove trailing _
---
 src/or/circuitbuild.c |    2 +-
 src/or/circuitlist.c  |    2 +-
 src/or/circuitlist.h  |    2 +-
 src/or/circuituse.c   |   18 +++++++++---------
 src/or/control.c      |    2 +-
 src/or/relay.c        |    2 +-
 src/or/rendclient.c   |    2 +-
 src/or/rendservice.c  |    4 ++--
 src/or/rephist.c      |    2 +-
 src/or/status.c       |    2 +-
 10 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 0b5a855..21fc2ae 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -2174,7 +2174,7 @@ pathbias_count_circs_in_states(entry_guard_t *guard,
   int open_circuits = 0;
 
   /* Count currently open circuits. Give them the benefit of the doubt. */
-  TOR_LIST_FOREACH(circ, circuit_get_global_list_(), head) {
+  TOR_LIST_FOREACH(circ, circuit_get_global_list(), head) {
     origin_circuit_t *ocirc = NULL;
     if (!CIRCUIT_IS_ORIGIN(circ) || /* didn't originate here */
         circ->marked_for_close) /* already counted */
diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index a4144e8..69c4c4b 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -435,7 +435,7 @@ circuit_close_all_marked(void)
 
 /** Return the head of the global linked list of circuits. */
 struct global_circuitlist_s *
-circuit_get_global_list_(void)
+circuit_get_global_list(void)
 {
   return &global_circuitlist;
 }
diff --git a/src/or/circuitlist.h b/src/or/circuitlist.h
index a43315d..bf3d1b4 100644
--- a/src/or/circuitlist.h
+++ b/src/or/circuitlist.h
@@ -16,7 +16,7 @@
 
 TOR_LIST_HEAD(global_circuitlist_s, circuit_t);
 
-struct global_circuitlist_s* circuit_get_global_list_(void);
+struct global_circuitlist_s* circuit_get_global_list(void);
 const char *circuit_state_to_string(int state);
 const char *circuit_purpose_to_controller_string(uint8_t purpose);
 const char *circuit_purpose_to_controller_hs_state_string(uint8_t purpose);
diff --git a/src/or/circuituse.c b/src/or/circuituse.c
index fdafa3f..7beaa4e 100644
--- a/src/or/circuituse.c
+++ b/src/or/circuituse.c
@@ -280,7 +280,7 @@ circuit_get_best(const entry_connection_t *conn,
 
   tor_gettimeofday(&now);
 
-  TOR_LIST_FOREACH(circ, circuit_get_global_list_(), head) {
+  TOR_LIST_FOREACH(circ, circuit_get_global_list(), head) {
     origin_circuit_t *origin_circ;
     if (!CIRCUIT_IS_ORIGIN(circ))
       continue;
@@ -321,7 +321,7 @@ count_pending_general_client_circuits(void)
 
   int count = 0;
 
-  TOR_LIST_FOREACH(circ, circuit_get_global_list_(), head) {
+  TOR_LIST_FOREACH(circ, circuit_get_global_list(), head) {
     if (circ->marked_for_close ||
         circ->state == CIRCUIT_STATE_OPEN ||
         circ->purpose != CIRCUIT_PURPOSE_C_GENERAL ||
@@ -387,7 +387,7 @@ circuit_expire_building(void)
    * we want to be more lenient with timeouts, in case the
    * user has relocated and/or changed network connections.
    * See bug #3443. */
-  TOR_LIST_FOREACH(next_circ, circuit_get_global_list_(), head) {
+  TOR_LIST_FOREACH(next_circ, circuit_get_global_list(), head) {
     if (!CIRCUIT_IS_ORIGIN(next_circ) || /* didn't originate here */
         next_circ->marked_for_close) { /* don't mess with marked circs */
       continue;
@@ -472,7 +472,7 @@ circuit_expire_building(void)
              MAX(circ_times.close_ms*2 + 1000,
                  options->SocksTimeout * 1000));
 
-  TOR_LIST_FOREACH(next_circ, circuit_get_global_list_(), head) {
+  TOR_LIST_FOREACH(next_circ, circuit_get_global_list(), head) {
     struct timeval cutoff;
     victim = next_circ;
     if (!CIRCUIT_IS_ORIGIN(victim) || /* didn't originate here */
@@ -808,7 +808,7 @@ circuit_stream_is_being_handled(entry_connection_t *conn,
                                    get_options()->LongLivedPorts,
                                    conn ? conn->socks_request->port : port);
 
-  TOR_LIST_FOREACH(circ, circuit_get_global_list_(), head) {
+  TOR_LIST_FOREACH(circ, circuit_get_global_list(), head) {
     if (CIRCUIT_IS_ORIGIN(circ) &&
         !circ->marked_for_close &&
         circ->purpose == CIRCUIT_PURPOSE_C_GENERAL &&
@@ -859,7 +859,7 @@ circuit_predict_and_launch_new(void)
   int flags = 0;
 
   /* First, count how many of each type of circuit we have already. */
-  TOR_LIST_FOREACH(circ, circuit_get_global_list_(), head) {
+  TOR_LIST_FOREACH(circ, circuit_get_global_list(), head) {
     cpath_build_state_t *build_state;
     origin_circuit_t *origin_circ;
     if (!CIRCUIT_IS_ORIGIN(circ))
@@ -1083,7 +1083,7 @@ circuit_expire_old_circuits_clientside(void)
     cutoff.tv_sec -= get_options()->CircuitIdleTimeout;
   }
 
-  TOR_LIST_FOREACH(circ, circuit_get_global_list_(), head) {
+  TOR_LIST_FOREACH(circ, circuit_get_global_list(), head) {
     if (circ->marked_for_close || !CIRCUIT_IS_ORIGIN(circ))
       continue;
     /* If the circuit has been dirty for too long, and there are no streams
@@ -1166,7 +1166,7 @@ circuit_expire_old_circuits_serverside(time_t now)
   or_circuit_t *or_circ;
   time_t cutoff = now - IDLE_ONE_HOP_CIRC_TIMEOUT;
 
-  TOR_LIST_FOREACH(circ, circuit_get_global_list_(), head) {
+  TOR_LIST_FOREACH(circ, circuit_get_global_list(), head) {
     if (circ->marked_for_close || CIRCUIT_IS_ORIGIN(circ))
       continue;
     or_circ = TO_OR_CIRCUIT(circ);
@@ -1213,7 +1213,7 @@ circuit_enough_testing_circs(void)
   if (have_performed_bandwidth_test)
     return 1;
 
-  TOR_LIST_FOREACH(circ, circuit_get_global_list_(), head) {
+  TOR_LIST_FOREACH(circ, circuit_get_global_list(), head) {
     if (!circ->marked_for_close && CIRCUIT_IS_ORIGIN(circ) &&
         circ->purpose == CIRCUIT_PURPOSE_TESTING &&
         circ->state == CIRCUIT_STATE_OPEN)
diff --git a/src/or/control.c b/src/or/control.c
index d624d28..81df00c 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -1928,7 +1928,7 @@ getinfo_helper_events(control_connection_t *control_conn,
   if (!strcmp(question, "circuit-status")) {
     circuit_t *circ_;
     smartlist_t *status = smartlist_new();
-    TOR_LIST_FOREACH(circ_, circuit_get_global_list_(), head) {
+    TOR_LIST_FOREACH(circ_, circuit_get_global_list(), head) {
       origin_circuit_t *circ;
       char *circdesc;
       const char *state;
diff --git a/src/or/relay.c b/src/or/relay.c
index 9a0fdd9..010dd1d 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -2113,7 +2113,7 @@ dump_cell_pool_usage(int severity)
   circuit_t *c;
   int n_circs = 0;
   int n_cells = 0;
-  TOR_LIST_FOREACH(c, circuit_get_global_list_(), head) {
+  TOR_LIST_FOREACH(c, circuit_get_global_list(), head) {
     n_cells += c->n_chan_cells.n;
     if (!CIRCUIT_IS_ORIGIN(c))
       n_cells += TO_OR_CIRCUIT(c)->p_chan_cells.n;
diff --git a/src/or/rendclient.c b/src/or/rendclient.c
index ea4512d..8b8c0e5 100644
--- a/src/or/rendclient.c
+++ b/src/or/rendclient.c
@@ -358,7 +358,7 @@ rend_client_close_other_intros(const char *onion_address)
 {
   circuit_t *c;
   /* abort parallel intro circs, if any */
-  TOR_LIST_FOREACH(c, circuit_get_global_list_(), head) {
+  TOR_LIST_FOREACH(c, circuit_get_global_list(), head) {
     if ((c->purpose == CIRCUIT_PURPOSE_C_INTRODUCING ||
         c->purpose == CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT) &&
         !c->marked_for_close && CIRCUIT_IS_ORIGIN(c)) {
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index fb56dc0..730e47f 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -543,7 +543,7 @@ rend_config_services(const or_options_t *options, int validate_only)
     /* XXXX it would be nicer if we had a nicer abstraction to use here,
      * so we could just iterate over the list of services to close, but
      * once again, this isn't critical-path code. */
-    TOR_LIST_FOREACH(circ, circuit_get_global_list_(), head) {
+    TOR_LIST_FOREACH(circ, circuit_get_global_list(), head) {
       if (!circ->marked_for_close &&
           circ->state == CIRCUIT_STATE_OPEN &&
           (circ->purpose == CIRCUIT_PURPOSE_S_ESTABLISH_INTRO ||
@@ -2375,7 +2375,7 @@ count_established_intro_points(const char *query)
 {
   int num_ipos = 0;
   circuit_t *circ;
-  TOR_LIST_FOREACH(circ, circuit_get_global_list_(), head) {
+  TOR_LIST_FOREACH(circ, circuit_get_global_list(), head) {
     if (!circ->marked_for_close &&
         circ->state == CIRCUIT_STATE_OPEN &&
         (circ->purpose == CIRCUIT_PURPOSE_S_ESTABLISH_INTRO ||
diff --git a/src/or/rephist.c b/src/or/rephist.c
index 0943a34..d945dd8 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -2599,7 +2599,7 @@ rep_hist_buffer_stats_write(time_t now)
     goto done; /* Not ready to write */
 
   /* Add open circuits to the history. */
-  TOR_LIST_FOREACH(circ, circuit_get_global_list_(), head) {
+  TOR_LIST_FOREACH(circ, circuit_get_global_list(), head) {
     rep_hist_buffer_stats_add_circ(circ, now);
   }
 
diff --git a/src/or/status.c b/src/or/status.c
index 6fe2f67..577587d 100644
--- a/src/or/status.c
+++ b/src/or/status.c
@@ -23,7 +23,7 @@ count_circuits(void)
   circuit_t *circ;
   int nr=0;
 
-  TOR_LIST_FOREACH(circ, circuit_get_global_list_(), head)
+  TOR_LIST_FOREACH(circ, circuit_get_global_list(), head)
     nr++;
 
   return nr;





More information about the tor-commits mailing list