diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-07-14 14:26:24 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-07-16 09:02:10 -0400 |
commit | 4f4785a8c113806d00c6a31154956edb86c1639f (patch) | |
tree | a4f33dada8ef81fd7b1942da72fe86882f233898 /src/test/test_channel.c | |
parent | f9aafcd64e69d602eb4284e530fe9b8973cf7406 (diff) | |
download | tor-4f4785a8c113806d00c6a31154956edb86c1639f.tar.gz tor-4f4785a8c113806d00c6a31154956edb86c1639f.zip |
Refactor channel description internals.
Now that we've clarified that these functions only need to describe
the peer in a human-readable way, we can have them delegate to
connection_describe_peer().
Diffstat (limited to 'src/test/test_channel.c')
-rw-r--r-- | src/test/test_channel.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/test/test_channel.c b/src/test/test_channel.c index efe195eac4..14d8a4eae7 100644 --- a/src/test/test_channel.c +++ b/src/test/test_channel.c @@ -163,10 +163,9 @@ chan_test_finish_close(channel_t *ch) } static const char * -chan_test_get_remote_descr(channel_t *ch, int flags) +chan_test_describe_peer(const channel_t *ch) { tt_assert(ch); - tt_int_op(flags & ~(GRD_FLAG_ORIGINAL), OP_EQ, 0); done: return "Fake channel for unit tests; no real endpoint"; @@ -276,7 +275,7 @@ new_fake_channel(void) chan->close = chan_test_close; chan->num_cells_writeable = chan_test_num_cells_writeable; - chan->get_remote_descr = chan_test_get_remote_descr; + chan->describe_peer = chan_test_describe_peer; chan->get_remote_addr = chan_test_get_remote_addr; chan->write_packed_cell = chan_test_write_packed_cell; chan->write_var_cell = chan_test_write_var_cell; |