mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Rename private bandwidth-history identifiers to start with "bwhist".
This commit is a simple search-and-replace in bwhist.c
This commit is contained in:
parent
2fc8257ac4
commit
c5eb601e60
@ -280,7 +280,7 @@ bwhist_bandwidth_assess,(void))
|
|||||||
* It returns the number of bytes written.
|
* It returns the number of bytes written.
|
||||||
*/
|
*/
|
||||||
static size_t
|
static size_t
|
||||||
rep_hist_fill_bandwidth_history(char *buf, size_t len, const bw_array_t *b)
|
bwhist_fill_bandwidth_history(char *buf, size_t len, const bw_array_t *b)
|
||||||
{
|
{
|
||||||
char *cp = buf;
|
char *cp = buf;
|
||||||
int i, n;
|
int i, n;
|
||||||
@ -367,7 +367,7 @@ bwhist_get_bandwidth_lines(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
tor_assert(b);
|
tor_assert(b);
|
||||||
slen = rep_hist_fill_bandwidth_history(tmp, MAX_HIST_VALUE_LEN, b);
|
slen = bwhist_fill_bandwidth_history(tmp, MAX_HIST_VALUE_LEN, b);
|
||||||
/* If we don't have anything to write, skip to the next entry. */
|
/* If we don't have anything to write, skip to the next entry. */
|
||||||
if (slen == 0)
|
if (slen == 0)
|
||||||
continue;
|
continue;
|
||||||
@ -386,7 +386,7 @@ bwhist_get_bandwidth_lines(void)
|
|||||||
/** Write a single bw_array_t into the Values, Ends, Interval, and Maximum
|
/** Write a single bw_array_t into the Values, Ends, Interval, and Maximum
|
||||||
* entries of an or_state_t. Done before writing out a new state file. */
|
* entries of an or_state_t. Done before writing out a new state file. */
|
||||||
static void
|
static void
|
||||||
rep_hist_update_bwhist_state_section(or_state_t *state,
|
bwhist_update_bwhist_state_section(or_state_t *state,
|
||||||
const bw_array_t *b,
|
const bw_array_t *b,
|
||||||
smartlist_t **s_values,
|
smartlist_t **s_values,
|
||||||
smartlist_t **s_maxima,
|
smartlist_t **s_maxima,
|
||||||
@ -449,7 +449,7 @@ void
|
|||||||
bwhist_update_state(or_state_t *state)
|
bwhist_update_state(or_state_t *state)
|
||||||
{
|
{
|
||||||
#define UPDATE(arrname,st) \
|
#define UPDATE(arrname,st) \
|
||||||
rep_hist_update_bwhist_state_section(state,\
|
bwhist_update_bwhist_state_section(state,\
|
||||||
(arrname),\
|
(arrname),\
|
||||||
&state->BWHistory ## st ## Values, \
|
&state->BWHistory ## st ## Values, \
|
||||||
&state->BWHistory ## st ## Maxima, \
|
&state->BWHistory ## st ## Maxima, \
|
||||||
@ -470,7 +470,7 @@ bwhist_update_state(or_state_t *state)
|
|||||||
/** Load a single bw_array_t from its Values, Ends, Maxima, and Interval
|
/** Load a single bw_array_t from its Values, Ends, Maxima, and Interval
|
||||||
* entries in an or_state_t. Done while reading the state file. */
|
* entries in an or_state_t. Done while reading the state file. */
|
||||||
static int
|
static int
|
||||||
rep_hist_load_bwhist_state_section(bw_array_t *b,
|
bwhist_load_bwhist_state_section(bw_array_t *b,
|
||||||
const smartlist_t *s_values,
|
const smartlist_t *s_values,
|
||||||
const smartlist_t *s_maxima,
|
const smartlist_t *s_maxima,
|
||||||
const time_t s_begins,
|
const time_t s_begins,
|
||||||
@ -555,7 +555,7 @@ bwhist_load_state(or_state_t *state, char **err)
|
|||||||
tor_assert(dir_read_array && dir_write_array);
|
tor_assert(dir_read_array && dir_write_array);
|
||||||
|
|
||||||
#define LOAD(arrname,st) \
|
#define LOAD(arrname,st) \
|
||||||
if (rep_hist_load_bwhist_state_section( \
|
if (bwhist_load_bwhist_state_section( \
|
||||||
(arrname), \
|
(arrname), \
|
||||||
state->BWHistory ## st ## Values, \
|
state->BWHistory ## st ## Values, \
|
||||||
state->BWHistory ## st ## Maxima, \
|
state->BWHistory ## st ## Maxima, \
|
||||||
|
Loading…
Reference in New Issue
Block a user