diff options
author | rl1987 <rl1987@sdf.lonestar.org> | 2014-04-28 23:20:58 +0300 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-12-29 09:59:47 -0500 |
commit | 28217b969eec213e7eb01bc8382fb1236eb4bbdd (patch) | |
tree | 6ee75f692cbf0c3c2e74adf6815387a39408d10b /src/common/address.c | |
parent | a56511e594b14e8c97605c8e12084a91028d3747 (diff) | |
download | tor-28217b969eec213e7eb01bc8382fb1236eb4bbdd.tar.gz tor-28217b969eec213e7eb01bc8382fb1236eb4bbdd.zip |
Adding comprehensive test cases for resolve_my_address.
Also, improve comments on resolve_my_address to explain what it
actually does.
Diffstat (limited to 'src/common/address.c')
-rw-r--r-- | src/common/address.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/address.c b/src/common/address.c index e5930dedca..c9b5cf4d9b 100644 --- a/src/common/address.c +++ b/src/common/address.c @@ -1354,8 +1354,8 @@ tor_addr_is_multicast(const tor_addr_t *a) * connects to the Internet. This address should only be used in checking * whether our address has changed. Return 0 on success, -1 on failure. */ -int -get_interface_address6(int severity, sa_family_t family, tor_addr_t *addr) +MOCK_IMPL(int, +get_interface_address6,(int severity, sa_family_t family, tor_addr_t *addr)) { /* XXX really, this function should yield a smartlist of addresses. */ smartlist_t *addrs; @@ -1684,8 +1684,8 @@ tor_dup_ip(uint32_t addr) * checking whether our address has changed. Return 0 on success, -1 on * failure. */ -int -get_interface_address(int severity, uint32_t *addr) +MOCK_IMPL(int, +get_interface_address,(int severity, uint32_t *addr)) { tor_addr_t local_addr; int r; |