diff options
author | George Kadianakis <desnacked@riseup.net> | 2012-03-31 13:48:20 +0200 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2012-03-31 13:48:20 +0200 |
commit | da6e0993dc4a0037933a522e2f578c145f6538cc (patch) | |
tree | 77b0f6caf8269fd90d24860349276423651ea4b5 /src/common/address.c | |
parent | 458718d4975661831fa21d9f2653932e17c1bae0 (diff) | |
download | tor-da6e0993dc4a0037933a522e2f578c145f6538cc.tar.gz tor-da6e0993dc4a0037933a522e2f578c145f6538cc.zip |
Generalize fmt_addr() to support IPv6 decorations.
Diffstat (limited to 'src/common/address.c')
-rw-r--r-- | src/common/address.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/address.c b/src/common/address.c index 676c485897..62cf16c03c 100644 --- a/src/common/address.c +++ b/src/common/address.c @@ -991,11 +991,11 @@ tor_dup_addr(const tor_addr_t *addr) * <b>fmt_addr</b> invalidates the last result of the function. This * function is not thread-safe. */ const char * -fmt_addr(const tor_addr_t *addr) +fmt_addr_impl(const tor_addr_t *addr, int decorate) { static char buf[TOR_ADDR_BUF_LEN]; if (!addr) return "<null>"; - if (tor_addr_to_str(buf, addr, sizeof(buf), 0)) + if (tor_addr_to_str(buf, addr, sizeof(buf), decorate)) return buf; else return "???"; |