diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-08-07 19:13:35 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-08-07 19:13:35 +0000 |
commit | d9601c65e0529c1f79e52ca3576cbc8f0a82f8f6 (patch) | |
tree | 7025b74af0ad9c3bfb8a0ce6953864787d150e6a /src/or/test.c | |
parent | 635f3c8aeef717d03a86117dfa81944fb6788bca (diff) | |
download | tor-d9601c65e0529c1f79e52ca3576cbc8f0a82f8f6.tar.gz tor-d9601c65e0529c1f79e52ca3576cbc8f0a82f8f6.zip |
r17666@tombo: nickm | 2008-08-07 15:12:30 -0400
Make tor_addr_from_sockaddr also give away the port in a useful format
svn:r16458
Diffstat (limited to 'src/or/test.c')
-rw-r--r-- | src/or/test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/test.c b/src/or/test.c index 0f19e5b015..fde4f5b1d7 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -1328,7 +1328,7 @@ test_util_ip6_helpers(void) sin->sin_family = AF_INET; sin->sin_port = 9090; sin->sin_addr.s_addr = htonl(0x7f7f0102); /*127.127.1.2*/ - tor_addr_from_sockaddr(&t1, (struct sockaddr *)sin); + tor_addr_from_sockaddr(&t1, (struct sockaddr *)sin, NULL); test_eq(tor_addr_family(&t1), AF_INET); test_eq(tor_addr_to_ipv4h(&t1), 0x7f7f0102); @@ -1344,7 +1344,7 @@ test_util_ip6_helpers(void) sin6->sin6_family = AF_INET6; sin6->sin6_port = htons(7070); sin6->sin6_addr.s6_addr[0] = 128; - tor_addr_from_sockaddr(&t1, (struct sockaddr *)sin6); + tor_addr_from_sockaddr(&t1, (struct sockaddr *)sin6, NULL); test_eq(tor_addr_family(&t1), AF_INET6); p1 = tor_addr_to_str(buf, &t1, sizeof(buf), 0); test_streq(p1, "8000::"); |