aboutsummaryrefslogtreecommitdiff
path: root/tests/zt.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-03-14 15:40:46 -0700
committerGarrett D'Amore <garrett@damore.org>2018-03-14 17:16:39 -0700
commit85ccb0066a86a3558ae81cd357463f8dc631f94b (patch)
tree15838902439f6ed188ffb70fe2170605f26894bc /tests/zt.c
parentf4de6b5302df8befbd2b229b701d0bf9ca81a5fb (diff)
downloadnng-85ccb0066a86a3558ae81cd357463f8dc631f94b.tar.gz
nng-85ccb0066a86a3558ae81cd357463f8dc631f94b.tar.bz2
nng-85ccb0066a86a3558ae81cd357463f8dc631f94b.zip
fixes #289 nng_sockaddr could just be a union
fixes #290 sockaddr improvements
Diffstat (limited to 'tests/zt.c')
-rw-r--r--tests/zt.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/zt.c b/tests/zt.c
index 1952ef1b..3344f32b 100644
--- a/tests/zt.c
+++ b/tests/zt.c
@@ -53,10 +53,10 @@ check_props(nng_msg *msg)
z = sizeof(nng_sockaddr);
So(nng_pipe_getopt(p, NNG_OPT_LOCADDR, &la, &z) == 0);
So(z == sizeof(la));
- So(la.s_un.s_family == NNG_AF_ZT);
- So(la.s_un.s_zt.sa_port == (trantest_port - 1));
- So(la.s_un.s_zt.sa_nwid == 0xa09acf02337b057bull);
- So(la.s_un.s_zt.sa_nodeid != 0);
+ So(la.s_family == NNG_AF_ZT);
+ So(la.s_zt.sa_port == (trantest_port - 1));
+ So(la.s_zt.sa_nwid == 0xa09acf02337b057bull);
+ So(la.s_zt.sa_nodeid != 0);
});
Convey("Remote address property works", {
@@ -66,14 +66,14 @@ check_props(nng_msg *msg)
z = sizeof(nng_sockaddr);
So(nng_pipe_getopt(p, NNG_OPT_REMADDR, &ra, &z) == 0);
So(z == sizeof(ra));
- So(ra.s_un.s_family == NNG_AF_ZT);
- So(ra.s_un.s_zt.sa_port != 0);
- So(ra.s_un.s_zt.sa_nwid == 0xa09acf02337b057bull);
+ So(ra.s_family == NNG_AF_ZT);
+ So(ra.s_zt.sa_port != 0);
+ So(ra.s_zt.sa_nwid == 0xa09acf02337b057bull);
z = sizeof(mynode);
So(nng_pipe_getopt(p, NNG_OPT_ZT_NODE, &mynode, &z) == 0);
So(mynode != 0);
- So(ra.s_un.s_zt.sa_nodeid == mynode);
+ So(ra.s_zt.sa_nodeid == mynode);
});
Convey("NWID property works", {