Nick Mathewson
339df5df08
Fix 8447: use %u to format circid_t.
...
Now that circid_t is 4 bytes long, the default integer promotions will
leave it alone when sizeof(int) == 4, which will leave us formatting an
unsigned as an int. That's technically undefined behavior.
Fixes bug 8447 on bfffc1f0fc
. Bug not
in any released Tor.
2013-03-10 19:52:06 -04:00
Nick Mathewson
4da083db3b
Update the copyright date to 201.
2013-01-16 01:54:56 -05:00
Andrea Shepard
5543c5b202
Fix formatting in various places after 6465/6816 work
2012-10-10 00:48:36 -07:00
Andrea Shepard
bec776480d
Don't remove circuitmux hash table entries in circuitmux_detach_circuit() until after circuitmux_make_circuit_inactive()
2012-10-10 00:44:47 -07:00
Andrea Shepard
1bc9a040f7
Fix 'warning: circuit was already inactive' and assert in circuitmux_make_circuit_inactive() during circuitmux_detach_all_circuits()
2012-10-10 00:44:47 -07:00
Andrea Shepard
c9e48ded5d
Bring summary comment block in circuitmux.c up to date
2012-10-10 00:44:47 -07:00
Andrea Shepard
49d534e524
New and improved circuitmux_detach_all_circuits(), now without the stupid
2012-10-10 00:44:47 -07:00
Andrea Shepard
13972aee78
Fix broken circuitmux_move_active_circ_to_tail(); don't assume n_chan is not NULL in circuitmux_detach_circuit()
2012-10-10 00:44:46 -07:00
Andrea Shepard
903cc8acd1
Allow n_chan to be NULL in circuitmux_find_map_entry(); it can be but with non-NULL p_chan when extending a circuit
2012-10-10 00:44:46 -07:00
Andrea Shepard
a0200c1f6e
Use circuit_get_by_circid_channel_even_if_marked() and fix some asserts in circuitmux.c
2012-10-10 00:44:46 -07:00
Andrea Shepard
3d092ffbdd
Handle closing circuits correctly with circuitmux_t
2012-10-10 00:44:46 -07:00
Andrea Shepard
6830c9c232
Add a bunch of paranoid-mode expensive asserts incircuitmux.c
2012-10-10 00:44:46 -07:00
Andrea Shepard
7598e669e8
Adjust the circuitmux_t counter correctly in circuitmux_notify_xmit_cells()
2012-10-10 00:44:46 -07:00
Andrea Shepard
34591c61ef
Implement circuitmux_assert_okay() and helper functions in circuitmux.c
2012-10-10 00:44:46 -07:00
Andrea Shepard
4a14c6aa67
Implement circuitmux_get_first_active_circuit() in circuitmux.c; add pick_active_circuit() to circuitmux_policy_t in circuitmux.h
2012-10-10 00:44:46 -07:00
Andrea Shepard
c4e5e4727d
Add comment for circuitmux_notify_xmit_cells() in circuitmux.c
2012-10-10 00:44:46 -07:00
Andrea Shepard
741bc97b24
Add comment for circuitmux_move_active_circ_to_tail() in circuitmux.c
2012-10-10 00:44:46 -07:00
Andrea Shepard
aff77eb1a9
Implement circuitmux_notify_xmit_cells() and circuitmux_move_active_circ_to_tail() helper in circuitmux.c
2012-10-10 00:44:46 -07:00
Andrea Shepard
debef8f0cd
Consistently allow policy alloc_cmux_data() and alloc_circ_data() functions to return NULL if the policy does not use this in circuitmux.c
2012-10-10 00:44:46 -07:00
Andrea Shepard
86d9d85dfc
Implement circuitmux_clear_policy(), circuitmux_get_policy() and circuitmux_set_policy() in circuitmux.c
2012-10-10 00:44:45 -07:00
Andrea Shepard
eade7a37cd
Add cmux policy notify_set_n_cells() and notify_xmit_cells() callbacks
2012-10-10 00:44:45 -07:00
Andrea Shepard
930e3d611a
Allocate and free circuit-specific policy data in the right places
2012-10-10 00:44:45 -07:00
Andrea Shepard
851734d324
Implement circuitmux policy basic notifications mechanism
2012-10-10 00:44:45 -07:00
Andrea Shepard
38fa3b7e44
Implement circuitmux_make_circuit_inactive(), circuitmux_make_circuit_active() and linked list helper functions in circuitmux.c
2012-10-10 00:44:45 -07:00
Andrea Shepard
fd31dd440c
Implement circuitmux_detach_all_circuits() in circuitmux.c
2012-10-10 00:43:18 -07:00
Andrea Shepard
9da04141e2
Implement circuitmux_is_circuit_active(), circuitmux_num_cells_for_circuit(), circuitmux_num_cells(), circuitmux_num_active_circuits() and circuitmux_num_circuits() in circuitmux.c
2012-10-10 00:43:18 -07:00
Andrea Shepard
a9deec3550
Implement circuitmux_clear_num_cells() and circuitmux_set_num_cells() in circuitmux.c, remove unneeded circuitmux_add_to_num_cells() from circuitmux.h
2012-10-10 00:43:18 -07:00
Andrea Shepard
8004448635
Handle n_mux/p_mux properly in circuitmux.c
2012-10-10 00:43:18 -07:00
Andrea Shepard
c3ebd0340c
Implement circuitmux_detach_circuit() in circuitmux.c
2012-10-10 00:43:17 -07:00
Andrea Shepard
7e5c358d38
Implement circuitmux_attached_circuit_direction(), circuitmux_find_map_entry() and circuitmux_is_circuit_attached() in circuitmux.c
2012-10-10 00:41:55 -07:00
Andrea Shepard
3c41d7f414
Implement circuitmux_attach_circuit() in circuitmux.c
2012-10-10 00:41:49 -07:00
Andrea Shepard
e4a11b890e
Implement circuitmux_alloc()/circuitmux_free() and chanid/circid->muxinfo hash table
2012-10-10 00:40:10 -07:00
Andrea Shepard
c684076fc7
Add circuitmux.c, circuitmux.h
2012-10-10 00:39:11 -07:00