diff options
author | David Goulet <dgoulet@torproject.org> | 2020-07-24 09:19:19 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2020-07-24 11:32:49 -0400 |
commit | bf2b1e7a6f7d0410515468d0b5440d45c0745c5a (patch) | |
tree | 4bb45d44fc80dae7817de43ed7fb12edce9e013d /src/test/test_relay.c | |
parent | 9d922b8eaae542429e1a12d82a43883b3be69acf (diff) | |
download | tor-bf2b1e7a6f7d0410515468d0b5440d45c0745c5a.tar.gz tor-bf2b1e7a6f7d0410515468d0b5440d45c0745c5a.zip |
relay: Turn find address "method_used" into enum
Enum allows us to easily compare what is being returned but also better
semantic to the code.
Related #33247
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/test/test_relay.c')
-rw-r--r-- | src/test/test_relay.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test_relay.c b/src/test/test_relay.c index ee704ceb8c..545cb4ac46 100644 --- a/src/test/test_relay.c +++ b/src/test/test_relay.c @@ -307,13 +307,13 @@ test_find_addr_to_publish(void *arg) /* Populate our resolved cache with a valid IPv4 and IPv6. */ family = tor_addr_parse(&ipv4_addr, "1.2.3.4"); tt_int_op(family, OP_EQ, AF_INET); - resolved_addr_set_last(&ipv4_addr, "NA", NULL); + resolved_addr_set_last(&ipv4_addr, RESOLVED_ADDR_CONFIGURED, NULL); resolved_addr_get_last(AF_INET, &cache_addr); tt_assert(tor_addr_eq(&ipv4_addr, &cache_addr)); family = tor_addr_parse(&ipv6_addr, "[4242::4242]"); tt_int_op(family, OP_EQ, AF_INET6); - resolved_addr_set_last(&ipv6_addr, "NA", NULL); + resolved_addr_set_last(&ipv6_addr, RESOLVED_ADDR_CONFIGURED, NULL); resolved_addr_get_last(AF_INET6, &cache_addr); tt_assert(tor_addr_eq(&ipv6_addr, &cache_addr)); |