aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/channel.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-07-10 08:41:00 -0400
committerNick Mathewson <nickm@torproject.org>2020-07-10 09:25:28 -0400
commita81827d99ffdd36d87ca91637f022558783d44ac (patch)
treeebbc59e01d019ab71db1a3cb8c87a564cea0b4d2 /src/core/or/channel.h
parentc5db7667d6964344e87fb7ee71df3f2ebe8131e6 (diff)
downloadtor-a81827d99ffdd36d87ca91637f022558783d44ac.tar.gz
tor-a81827d99ffdd36d87ca91637f022558783d44ac.zip
Make channel_get_addr_if_possible() take a const channel_t.
(There is no reason that looking up the address of a channel should ever change it.)
Diffstat (limited to 'src/core/or/channel.h')
-rw-r--r--src/core/or/channel.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/or/channel.h b/src/core/or/channel.h
index 4968c8714a..79e5fea9c5 100644
--- a/src/core/or/channel.h
+++ b/src/core/or/channel.h
@@ -335,7 +335,7 @@ struct channel_t {
* provided tor_addr_t *, and return 1 if successful or 0 if no address
* available.
*/
- int (*get_remote_addr)(channel_t *, tor_addr_t *);
+ int (*get_remote_addr)(const channel_t *, tor_addr_t *);
int (*get_transport_name)(channel_t *chan, char **transport_out);
#define GRD_FLAG_ORIGINAL 1
@@ -723,7 +723,7 @@ MOCK_DECL(void, channel_dump_statistics, (channel_t *chan, int severity));
void channel_dump_transport_statistics(channel_t *chan, int severity);
const char * channel_get_actual_remote_descr(channel_t *chan);
const char * channel_get_actual_remote_address(channel_t *chan);
-MOCK_DECL(int, channel_get_addr_if_possible, (channel_t *chan,
+MOCK_DECL(int, channel_get_addr_if_possible, (const channel_t *chan,
tor_addr_t *addr_out));
MOCK_DECL(const char *, channel_get_canonical_remote_descr,(channel_t *chan));
int channel_has_queued_writes(channel_t *chan);