mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 07:07:52 +01:00
Rename circuit_get_global_list to remove trailing _
This commit is contained in:
parent
d4634d1b72
commit
a3ffa1f76e
10 changed files with 19 additions and 19 deletions
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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 ||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue