diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-01-18 21:02:47 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-01-18 21:02:47 -0800 |
| commit | f2804cec25fa20ec0bf3e37ea99d89d117fce86a (patch) | |
| tree | 03f7c7442e2553f736af56f716d066f397e9259e /tests/survey.c | |
| parent | e6cded3832c9e92c922d49d824b446ce33fbf120 (diff) | |
| download | nng-f2804cec25fa20ec0bf3e37ea99d89d117fce86a.tar.gz nng-f2804cec25fa20ec0bf3e37ea99d89d117fce86a.tar.bz2 nng-f2804cec25fa20ec0bf3e37ea99d89d117fce86a.zip | |
Fix TCP hostname wildcards on Windows. Sort of.
I seem to be having a very difficult time getting dual-stack sockets
to function properly on Windows. I've sort of abandoned it for now.
I need to think about how to solve this -- it's not clear to me
right now whether dual stack sockets are the right answer or not.
People do expect these to work, but a tcp6:// url might be more
elegant.
Diffstat (limited to 'tests/survey.c')
| -rw-r--r-- | tests/survey.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/survey.c b/tests/survey.c index 7a5929ba..a749b0b1 100644 --- a/tests/survey.c +++ b/tests/survey.c @@ -18,7 +18,6 @@ So(memcmp(nng_msg_body(m), s, strlen(s)) == 0) Main({ - int rv; const char *addr = "inproc://test"; nni_init(); @@ -47,7 +46,6 @@ Main({ Convey("Survey without responder times out", { uint64_t expire = 50000; nng_msg *msg; - int rv; So(nng_setopt(surv, NNG_OPT_SURVEYTIME, &expire, sizeof (expire)) == 0); So(nng_msg_alloc(&msg, 0) == 0); @@ -84,10 +82,10 @@ Main({ nng_socket *sock; uint64_t expire; - So((rv = nng_open(&surv, NNG_PROTO_SURVEYOR)) == 0); + So(nng_open(&surv, NNG_PROTO_SURVEYOR) == 0); So(surv != NULL); - So((rv = nng_open(&resp, NNG_PROTO_RESPONDENT)) == 0); + So(nng_open(&resp, NNG_PROTO_RESPONDENT) == 0); So(resp != NULL); @@ -106,7 +104,7 @@ Main({ // earlier dial to have completed *fully*. This is a // hack that only works because our listen logic is // single threaded. - So((rv = nng_open(&sock, NNG_PROTO_RESPONDENT)) == 0); + So(nng_open(&sock, NNG_PROTO_RESPONDENT) == 0); So(nng_dial(sock, addr, NULL, NNG_FLAG_SYNCH) == 0); nng_close(sock); @@ -133,8 +131,7 @@ Main({ Convey("And goes to non-survey state", { rtimeo = 200000; So(nng_setopt(surv, NNG_OPT_RCVTIMEO, &rtimeo, sizeof (rtimeo)) == 0); - rv = nng_recvmsg(surv, &msg, 0); - So(rv== NNG_ESTATE); + So(nng_recvmsg(surv, &msg, 0) == NNG_ESTATE); }) }) }) |
