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
b208539b80
Use circuitmux_t in channels and when relaying cells
2012-10-10 00:40:06 -07:00
Andrea Shepard
c684076fc7
Add circuitmux.c, circuitmux.h
2012-10-10 00:39:11 -07:00
Andrea Shepard
bddfb9ffa8
Add magic number for type-checking channel casts
2012-10-09 23:19:53 -07:00
Andrea Shepard
f00b44ef8c
Improve comments on channel_write_*()
2012-10-09 23:19:53 -07:00
Andrea Shepard
1c3362dcdc
Use cell_queue_entry_new/free() functions in channel.c
2012-10-09 23:19:53 -07:00
Andrea Shepard
53454fad95
Set reason_for_closing when erroring out of channel_tls_connect()
2012-10-09 23:19:53 -07:00
Andrea Shepard
3f4b95b1a3
Split channel_t into channel_t and channel_listener_t; get rid of that big union
2012-10-09 23:19:53 -07:00
Nick Mathewson
ec97319464
Merge branch 'bug7014_squashed'
2012-10-09 23:50:09 -04:00
George Kadianakis
634d24c588
Don't call fmt_addr() twice in a parameter list.
2012-10-09 23:49:56 -04:00
Nick Mathewson
a01736e8b2
Merge remote-tracking branch 'origin/maint-0.2.3'
2012-10-09 23:49:26 -04:00
Nick Mathewson
e2549c3b74
Merge branch 'bug7014_023_squashed' into maint-0.2.3
2012-10-09 23:46:56 -04:00
George Kadianakis
721f99e495
Don't call fmt_addr() twice in a parameter list.
2012-10-09 23:46:04 -04:00
Andrea Shepard
6391f963fb
Conform to existing Doxygen style
2012-10-08 21:30:07 -07:00
Andrea Shepard
06a76d1db4
Refactor channel_write_cell()/channel_write_packed_cell()/channel_write_var_cell() to eliminate redundant code
2012-10-08 21:16:59 -07:00
Andrea Shepard
89a00ee63a
Use typedefs for function pointer return values and s/listener/listener_fn/ for distinctness
2012-10-08 20:49:19 -07:00
Andrea Shepard
ee4e88e4d9
s/cell_queue/incoming_queue/g in channel.c for consistency with outgoing_queue
2012-10-08 20:20:28 -07:00
Andrea Shepard
4686638743
Fix typo in comment
2012-10-08 20:15:09 -07:00
Andrea Shepard
d61e58e1ba
s/channel_request_close()/channel_mark_for_close()/g for consistency
2012-10-08 20:14:04 -07:00
Andrea Shepard
8a41dd20cb
Make channel_force_free() static
2012-10-08 20:10:13 -07:00
Andrea Shepard
123a08e4a3
Simplify channel_next_with_digest() in channel.c
2012-10-08 20:08:18 -07:00
Andrea Shepard
e877d02fdd
Eliminate unnecessary channel_set_cell_handler(), channel_set_var_cell_handler() in channel.c
2012-10-08 20:06:40 -07:00
Andrea Shepard
17356fe7fd
Eliminate unnecessary SMARTLIST_DEL_CURRENT() invocations in channel.c, channeltls.c
2012-10-08 20:02:42 -07:00
Andrea Shepard
bb92a2d7a8
Remove orphaned comment in channel_flush_some_cells_from_outgoing_queue()
2012-10-08 19:54:47 -07:00
Andrea Shepard
341928c807
Simplify channel_find_by_remote_digest()
2012-10-08 19:53:05 -07:00
Andrea Shepard
965c9de498
Abolish superfluous channel_find_by_remote_nickname()
2012-10-08 19:52:04 -07:00
Andrea Shepard
64e6f6687c
channel_free() should be a no-op
2012-10-08 19:50:41 -07:00
Andrea Shepard
e709fe320a
Use U64_FORMAT/U64_PRINTF_ARG rather than %lu for channel_t
2012-10-08 19:48:06 -07:00
Andrea Shepard
71ba517e0c
Check return value from connection_or_connect() in channel_tls_connect()
...
It's possible for connection_or_connect() to fail and return NULL after it
sets tlschan->conn, so not checking leaves a channel hanging around in
CHANNEL_STATE_OPENING with a pointer to a freed or_connection_t forever.
2012-10-08 18:24:04 -07:00
Andrea Shepard
b1b33f15be
Add changes file for channels (ticket 6465)
2012-10-08 03:06:09 -07:00
Andrea Shepard
7138a4adac
Keep better statistics about channels and dump them from dumpstats() on SIGUSR1
2012-10-08 03:06:09 -07:00
Andrea Shepard
a9a75ee59a
Call channel_tls_free_all() and channel_free_all() from tor_free_all in main.c
2012-10-08 03:06:09 -07:00
Andrea Shepard
72251385b0
Call connection_or_close_normally() rather than using connection_mark_for_close()/connection_mark_and_flush() in run_connection_housekeeping() of main.c so that channels get sent to the CLOSING state correctly (avoids an assert otherwise)
2012-10-08 03:06:09 -07:00
Andrea Shepard
07f9e8fc7d
Call channel_run_cleanup() in main.c, and include a comment explaining how closing or_connections related to channels
2012-10-08 03:06:09 -07:00
Andrea Shepard
f06880c855
Add LD_CHANNEL log domain in log.c
2012-10-08 03:06:09 -07:00
Andrea Shepard
cb62a0b69a
Use channel_is_bad_for_new_circs(), connection_or_get_num_circs() in main.c
2012-10-08 03:06:09 -07:00
Andrea Shepard
9ad7ba9f22
Use connection_or_get_num_circuits() in control.c
2012-10-08 03:06:09 -07:00
Andrea Shepard
f0f87cb68a
Convert rendmid.c to channel_t
2012-10-08 03:06:09 -07:00
Andrea Shepard
28f108bcce
Use dirreq_id from channel_t when appropriate
2012-10-08 03:06:09 -07:00
Andrea Shepard
8b14db9628
Switch onion.c over to channel_t
2012-10-08 03:06:09 -07:00
Andrea Shepard
77dac97354
Use channel_t in cpuworker.c
...
Note: this is a squashed commit; see branch bug6465_rebased_v2 of user/andrea/tor.git for full history of the following 2 commits:
Use channel_t in cpuworker.c
Fix bug in channel_t usage in cpuworker.c that was killing relaying on channel_t-ized Tor. The tags passed to the worker now have a channel ID, not a connection ID.
2012-10-08 03:06:09 -07:00
Andrea Shepard
6cce6241dd
Query circuit count from associated channel of or_conn in control.c
2012-10-08 03:06:09 -07:00
Andrea Shepard
35924435d2
Make reachabiity test in dirserv.c use channel_t
2012-10-08 03:06:07 -07:00
Andrea Shepard
e136f7ccb4
Convert relay.c/relay.h to channel_t
...
Note: this is a squashed commit; see branch bug6465_rebased_v2 of user/andrea/tor.git for full history of the following 10 commits:
Convert relay.c/relay.h to channel_t
Updating the timestamp if n_flushed > 0 at the end of channel_flush_from_first_active_circuit() was redundant since channel_write_cell() et al. do it themselves.
Get rid of now-unnecessary time parameter in channel_flush_from_first_active_circuit()
Get rid of now-unnecessary time parameter in channel_flush_from_first_active_circuit() in connection_or.c
Add non-inlined external call for channeltls.c to free a packed_cell_t
Appease make check-spaces in relay.c
Replace channel_get_write_queue_len() with sufficient and easier to implement channel_has_queued_writes() in relay.c
Rename channel_touched_by_client() and client_used field for consistency with other timestamps in relay.c
Don't double-free packed cells in relay.c (channel_t Tor now bootstraps and works as a client)
Rearrange channel_t struct to use a union distinguishing listener from cell-bearing channels in relay.c
2012-10-08 03:05:26 -07:00
Andrea Shepard
4768c0efe3
Support channel_t in connection_edge.c
2012-10-08 03:05:00 -07:00
Andrea Shepard
519c971f6a
Use channel_t in cmd.c
2012-10-08 03:05:00 -07:00
Andrea Shepard
32337502f1
Use channel_t rather than or_connection_t for circuits
2012-10-08 03:04:58 -07:00
Andrea Shepard
15303c32ec
Initial channeltls.c/channeltls.h for bug 6465
2012-10-08 03:04:00 -07:00
Andrea Shepard
7f952da553
Fix make check-spaces in circuitbuild.c and router.h
2012-10-08 03:04:00 -07:00