aboutsummaryrefslogtreecommitdiff
path: root/src/or/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/test.c')
-rw-r--r--src/or/test.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/or/test.c b/src/or/test.c
index 7d692c1f3..1d3c551b1 100644
--- a/src/or/test.c
+++ b/src/or/test.c
@@ -517,7 +517,7 @@ test_dir_format()
r1.addr = 0xc0a80001u; /* 192.168.0.1 */
r1.published_on = 0;
r1.or_port = 9000;
- r1.ap_port = 9002;
+ r1.socks_port = 9002;
r1.dir_port = 9003;
r1.onion_pkey = pk1;
r1.identity_pkey = pk2;
@@ -539,7 +539,7 @@ test_dir_format()
r2.addr = 0x0a030201u; /* 10.3.2.1 */
r2.published_on = 5;
r2.or_port = 9005;
- r2.ap_port = 0;
+ r2.socks_port = 0;
r2.dir_port = 0;
r2.onion_pkey = pk2;
r2.identity_pkey = pk1;
@@ -580,7 +580,7 @@ test_dir_format()
test_assert(rp1);
test_streq(rp1->address, r1.address);
test_eq(rp1->or_port, r1.or_port);
- test_eq(rp1->ap_port, r1.ap_port);
+ test_eq(rp1->socks_port, r1.socks_port);
test_eq(rp1->dir_port, r1.dir_port);
test_eq(rp1->bandwidth, r1.bandwidth);
test_assert(crypto_pk_cmp_keys(rp1->onion_pkey, pk1) == 0);
@@ -603,7 +603,7 @@ test_dir_format()
test_assert(rp2);
test_streq(rp2->address, r2.address);
test_eq(rp2->or_port, r2.or_port);
- test_eq(rp2->ap_port, r2.ap_port);
+ test_eq(rp2->socks_port, r2.socks_port);
test_eq(rp2->dir_port, r2.dir_port);
test_eq(rp2->bandwidth, r2.bandwidth);
test_assert(crypto_pk_cmp_keys(rp2->onion_pkey, pk2) == 0);
@@ -636,14 +636,14 @@ test_dir_format()
test_eq(2, dir2->n_routers);
#endif
- if (pk1_str) free(pk1_str);
- if (pk2_str) free(pk2_str);
+ tor_free(pk1_str);
+ tor_free(pk2_str);
if (pk1) crypto_free_pk_env(pk1);
if (pk2) crypto_free_pk_env(pk2);
if (rp1) routerinfo_free(rp1);
if (rp2) routerinfo_free(rp2);
- if (dir1) free(dir1); /* And more !*/
- if (dir1) free(dir2); /* And more !*/
+ tor_free(dir1); /* And more !*/
+ tor_free(dir2); /* And more !*/
/* make sure compare_recommended_versions() works */
test_eq(0, compare_recommended_versions("abc", "abc"));