diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-03-14 15:40:46 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-03-14 17:16:39 -0700 |
| commit | 85ccb0066a86a3558ae81cd357463f8dc631f94b (patch) | |
| tree | 15838902439f6ed188ffb70fe2170605f26894bc /tests/wssfile.c | |
| parent | f4de6b5302df8befbd2b229b701d0bf9ca81a5fb (diff) | |
| download | nng-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/wssfile.c')
| -rw-r--r-- | tests/wssfile.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/wssfile.c b/tests/wssfile.c index 8b5b0126..15f7008e 100644 --- a/tests/wssfile.c +++ b/tests/wssfile.c @@ -11,8 +11,8 @@ #include "convey.h" #include "nng.h" #include "protocol/pair1/pair.h" -#include "transport/ws/websocket.h" #include "supplemental/tls/tls.h" +#include "transport/ws/websocket.h" #include "trantest.h" @@ -107,21 +107,21 @@ validloopback(nng_sockaddr *sa) memset(ipv6, 0, sizeof(ipv6)); ipv6[15] = 1; - switch (sa->s_un.s_family) { + switch (sa->s_family) { case NNG_AF_INET: - if (sa->s_un.s_in.sa_port == 0) { + if (sa->s_in.sa_port == 0) { return (0); } - if (sa->s_un.s_in.sa_addr != htonl(0x7f000001)) { + if (sa->s_in.sa_addr != htonl(0x7f000001)) { return (0); } return (1); case NNG_AF_INET6: - if (sa->s_un.s_in6.sa_port == 0) { + if (sa->s_in6.sa_port == 0) { return (0); } - if (memcmp(sa->s_un.s_in6.sa_addr, ipv6, sizeof(ipv6)) != 0) { + if (memcmp(sa->s_in6.sa_addr, ipv6, sizeof(ipv6)) != 0) { return (0); } return (1); |
