mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Merge branch 'bug23512-v4-029-fixes'
This commit is contained in:
commit
a406255cf3
@ -998,7 +998,7 @@ rep_hist_load_mtbf_data(time_t now)
|
||||
/** Structure to track bandwidth use, and remember the maxima for a given
|
||||
* time period.
|
||||
*/
|
||||
typedef struct bw_array_t {
|
||||
struct bw_array_t {
|
||||
/** Observation array: Total number of bytes transferred in each of the last
|
||||
* NUM_SECS_ROLLING_MEASURE seconds. This is used as a circular array. */
|
||||
uint64_t obs[NUM_SECS_ROLLING_MEASURE];
|
||||
@ -1025,7 +1025,7 @@ typedef struct bw_array_t {
|
||||
/** Circular array of the total bandwidth usage for the last NUM_TOTALS
|
||||
* periods */
|
||||
uint64_t totals[NUM_TOTALS];
|
||||
} bw_array_t;
|
||||
};
|
||||
|
||||
/** Shift the current period of b forward by one. */
|
||||
STATIC void
|
||||
|
@ -113,7 +113,7 @@ test_relay_close_circuit(void *arg)
|
||||
tt_int_op(new_count, OP_EQ, old_count + 1);
|
||||
|
||||
/* Ensure our write totals are 0 */
|
||||
tt_int_op(find_largest_max(write_array), OP_EQ, 0);
|
||||
tt_u64_op(find_largest_max(write_array), OP_EQ, 0);
|
||||
|
||||
/* Mark the circuit for close */
|
||||
circuit_mark_for_close(TO_CIRCUIT(orcirc), 0);
|
||||
@ -122,7 +122,7 @@ test_relay_close_circuit(void *arg)
|
||||
advance_obs(write_array);
|
||||
commit_max(write_array);
|
||||
/* Check for two cells plus overhead */
|
||||
tt_int_op(find_largest_max(write_array), OP_EQ,
|
||||
tt_u64_op(find_largest_max(write_array), OP_EQ,
|
||||
2*(get_cell_network_size(nchan->wide_circ_ids)
|
||||
+TLS_PER_CELL_OVERHEAD));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user