diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-10-17 11:23:26 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-10-17 11:23:26 -0400 |
commit | 26946c659b5abdc38fd4dc8cd4b4659aadcf05f0 (patch) | |
tree | 9c5e5979f97991046ea5d4ba318c2dc8d3f84fd0 /src/or/channel.c | |
parent | 898bd1ae8f1eeb880eaaeba2caa1cda435a1ac5b (diff) | |
download | tor-26946c659b5abdc38fd4dc8cd4b4659aadcf05f0.tar.gz tor-26946c659b5abdc38fd4dc8cd4b4659aadcf05f0.zip |
Restore the 'address' value of tunneled connections
When we merged the channel code, we made the 'address' field of linked
directory connections created with begindir (and their associated edge
connections) contain an address:port string, when they should only
have contained the address part.
This patch also tweaks the interface to the get_descr method of
channels so that it takes a set of flags rather than a single flag.
Diffstat (limited to 'src/or/channel.c')
-rw-r--r-- | src/or/channel.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/or/channel.c b/src/or/channel.c index 10097ae477..13aa007fc0 100644 --- a/src/or/channel.c +++ b/src/or/channel.c @@ -3484,7 +3484,15 @@ channel_get_actual_remote_descr(channel_t *chan) tor_assert(chan->get_remote_descr); /* Param 1 indicates the actual description */ - return chan->get_remote_descr(chan, 1); + return chan->get_remote_descr(chan, GRD_FLAG_ORIGINAL); +} + +/** DOCDOC */ +const char * +channel_get_actual_remote_address(channel_t *chan) +{ + /* Param 1 indicates the actual description */ + return chan->get_remote_descr(chan, GRD_FLAG_ORIGINAL|GRD_FLAG_ADDR_ONLY); } /** |