diff options
author | Karsten Loesing <karsten.loesing@gmx.net> | 2013-05-25 12:21:09 +0200 |
---|---|---|
committer | Karsten Loesing <karsten.loesing@gmx.net> | 2013-05-25 19:51:38 +0200 |
commit | ef67077fba6061a6e5b9a76caf60a33d17a81ce6 (patch) | |
tree | d8d4c279b34401402e1044544dfae235860dfb47 /src/or/control.h | |
parent | 26b49f525d5b2a4781755d72738491c016dd15a9 (diff) | |
download | tor-ef67077fba6061a6e5b9a76caf60a33d17a81ce6.tar.gz tor-ef67077fba6061a6e5b9a76caf60a33d17a81ce6.zip |
Tweak TB_EMPTY event based on comments by nickm.
- Avoid control_event_refill_global function with 13 arguments and
increase code reuse factor by moving more code from control.c to
connection.c.
- Avoid an unsafe uint32_t -> int cast.
- Add TestingEnableTbEmptyEvent option.
- Prepare functions for testing.
- Rename a few functions and improve documentation.
Diffstat (limited to 'src/or/control.h')
-rw-r--r-- | src/or/control.h | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/or/control.h b/src/or/control.h index 06a3849493..c79c432ef1 100644 --- a/src/or/control.h +++ b/src/or/control.h @@ -54,18 +54,9 @@ int control_event_circ_bandwidth_used(void); int control_event_conn_bandwidth(connection_t *conn); int control_event_conn_bandwidth_used(void); int control_event_circuit_cell_stats(void); -int control_event_refill_global(int global_read, int prev_global_read, - uint32_t global_read_emptied, - int global_write, int prev_global_write, - uint32_t global_write_emptied, - int relay_read, int prev_relay_read, - uint32_t relay_read_emptied, - int relay_write, int prev_relay_write, - uint32_t relay_write_emptied, - uint32_t milliseconds_elapsed); -int control_event_refill_conn(or_connection_t *or_conn, - int prev_read, int prev_write, - uint32_t milliseconds_elapsed); +int control_event_tb_empty(const char *bucket, uint32_t read_empty_time, + uint32_t write_empty_time, + int milliseconds_elapsed); void control_event_logmsg(int severity, uint32_t domain, const char *msg); int control_event_descriptors_changed(smartlist_t *routers); int control_event_address_mapped(const char *from, const char *to, |