diff options
Diffstat (limited to 'src/sp/protocol')
| -rw-r--r-- | src/sp/protocol/bus0/bus_test.c | 2 | ||||
| -rw-r--r-- | src/sp/protocol/pair0/pair0_test.c | 12 | ||||
| -rw-r--r-- | src/sp/protocol/pair1/pair1_test.c | 12 | ||||
| -rw-r--r-- | src/sp/protocol/pipeline0/pull_test.c | 2 | ||||
| -rw-r--r-- | src/sp/protocol/pipeline0/push_test.c | 2 | ||||
| -rw-r--r-- | src/sp/protocol/pubsub0/pub_test.c | 2 | ||||
| -rw-r--r-- | src/sp/protocol/reqrep0/req_test.c | 2 | ||||
| -rw-r--r-- | src/sp/protocol/reqrep0/xrep_test.c | 6 | ||||
| -rw-r--r-- | src/sp/protocol/reqrep0/xreq_test.c | 2 | ||||
| -rw-r--r-- | src/sp/protocol/survey0/survey_test.c | 6 |
10 files changed, 24 insertions, 24 deletions
diff --git a/src/sp/protocol/bus0/bus_test.c b/src/sp/protocol/bus0/bus_test.c index 94ba8329..fd0116e7 100644 --- a/src/sp/protocol/bus0/bus_test.c +++ b/src/sp/protocol/bus0/bus_test.c @@ -378,7 +378,7 @@ test_bus_cooked(void) NUTS_PASS(nng_bus0_open(&s)); NUTS_PASS(nng_socket_raw(s, &b)); NUTS_TRUE(!b); - NUTS_PASS(nng_close(s)); + NUTS_CLOSE(s); // raw pub only differs in the option setting NUTS_PASS(nng_bus0_open_raw(&s)); diff --git a/src/sp/protocol/pair0/pair0_test.c b/src/sp/protocol/pair0/pair0_test.c index d883f1e3..dc3264be 100644 --- a/src/sp/protocol/pair0/pair0_test.c +++ b/src/sp/protocol/pair0/pair0_test.c @@ -215,7 +215,7 @@ test_pair0_send_stopped_aio(void) NUTS_FAIL(nng_aio_result(aio), NNG_ESTOPPED); nng_msg_free(msg); nng_aio_free(aio); - NUTS_PASS(nng_close(s1)); + NUTS_CLOSE(s1); } void @@ -235,7 +235,7 @@ test_pair0_send_canceled_aio(void) NUTS_FAIL(nng_aio_result(aio), NNG_ECANCELED); nng_msg_free(msg); nng_aio_free(aio); - NUTS_PASS(nng_close(s1)); + NUTS_CLOSE(s1); } void @@ -251,7 +251,7 @@ test_pair0_recv_stopped_aio(void) nng_aio_wait(aio); NUTS_FAIL(nng_aio_result(aio), NNG_ESTOPPED); nng_aio_free(aio); - NUTS_PASS(nng_close(s1)); + NUTS_CLOSE(s1); } void @@ -267,7 +267,7 @@ test_pair0_recv_canceled_aio(void) nng_aio_wait(aio); NUTS_FAIL(nng_aio_result(aio), NNG_ECANCELED); nng_aio_free(aio); - NUTS_PASS(nng_close(s1)); + NUTS_CLOSE(s1); } void test_pair0_raw(void) @@ -278,12 +278,12 @@ test_pair0_raw(void) NUTS_PASS(nng_pair0_open(&s1)); NUTS_PASS(nng_socket_raw(s1, &raw)); NUTS_TRUE(raw == false); - NUTS_PASS(nng_close(s1)); + NUTS_CLOSE(s1); NUTS_PASS(nng_pair0_open_raw(&s1)); NUTS_PASS(nng_socket_raw(s1, &raw)); NUTS_TRUE(raw == true); - NUTS_PASS(nng_close(s1)); + NUTS_CLOSE(s1); } void diff --git a/src/sp/protocol/pair1/pair1_test.c b/src/sp/protocol/pair1/pair1_test.c index 55fbb09f..8ed6ccbf 100644 --- a/src/sp/protocol/pair1/pair1_test.c +++ b/src/sp/protocol/pair1/pair1_test.c @@ -281,7 +281,7 @@ test_pair1_send_stopped_aio(void) NUTS_FAIL(nng_aio_result(aio), NNG_ESTOPPED); nng_msg_free(msg); nng_aio_free(aio); - NUTS_PASS(nng_close(s1)); + NUTS_CLOSE(s1); } void @@ -301,7 +301,7 @@ test_pair1_send_canceled_aio(void) NUTS_FAIL(nng_aio_result(aio), NNG_ECANCELED); nng_msg_free(msg); nng_aio_free(aio); - NUTS_PASS(nng_close(s1)); + NUTS_CLOSE(s1); } void @@ -317,7 +317,7 @@ test_pair1_recv_stopped_aio(void) nng_aio_wait(aio); NUTS_FAIL(nng_aio_result(aio), NNG_ESTOPPED); nng_aio_free(aio); - NUTS_PASS(nng_close(s1)); + NUTS_CLOSE(s1); } void @@ -333,7 +333,7 @@ test_pair1_recv_canceled_aio(void) nng_aio_wait(aio); NUTS_FAIL(nng_aio_result(aio), NNG_ECANCELED); nng_aio_free(aio); - NUTS_PASS(nng_close(s1)); + NUTS_CLOSE(s1); } void @@ -345,12 +345,12 @@ test_pair1_raw(void) NUTS_PASS(nng_pair1_open(&s1)); NUTS_PASS(nng_socket_raw(s1, &raw)); NUTS_TRUE(raw == false); - NUTS_PASS(nng_close(s1)); + NUTS_CLOSE(s1); NUTS_PASS(nng_pair1_open_raw(&s1)); NUTS_PASS(nng_socket_raw(s1, &raw)); NUTS_TRUE(raw == true); - NUTS_PASS(nng_close(s1)); + NUTS_CLOSE(s1); } void diff --git a/src/sp/protocol/pipeline0/pull_test.c b/src/sp/protocol/pipeline0/pull_test.c index fb57b9a2..131ff92c 100644 --- a/src/sp/protocol/pipeline0/pull_test.c +++ b/src/sp/protocol/pipeline0/pull_test.c @@ -207,7 +207,7 @@ test_pull_close_recv(void) NUTS_PASS(nng_aio_alloc(&aio, NULL, NULL)); nng_aio_set_timeout(aio, 1000); nng_recv_aio(s, aio); - NUTS_PASS(nng_close(s)); + NUTS_CLOSE(s); nng_aio_wait(aio); NUTS_FAIL(nng_aio_result(aio), NNG_ECLOSED); diff --git a/src/sp/protocol/pipeline0/push_test.c b/src/sp/protocol/pipeline0/push_test.c index e0d314ee..579178b5 100644 --- a/src/sp/protocol/pipeline0/push_test.c +++ b/src/sp/protocol/pipeline0/push_test.c @@ -271,7 +271,7 @@ test_push_close_send(void) nng_aio_set_timeout(aio, 1000); nng_aio_set_msg(aio, m); nng_send_aio(s, aio); - NUTS_PASS(nng_close(s)); + NUTS_CLOSE(s); nng_aio_wait(aio); NUTS_FAIL(nng_aio_result(aio), NNG_ECLOSED); diff --git a/src/sp/protocol/pubsub0/pub_test.c b/src/sp/protocol/pubsub0/pub_test.c index 8b3a5d78..2b571bef 100644 --- a/src/sp/protocol/pubsub0/pub_test.c +++ b/src/sp/protocol/pubsub0/pub_test.c @@ -193,7 +193,7 @@ test_pub_cooked(void) NUTS_PASS(nng_pub0_open(&s)); NUTS_PASS(nng_socket_raw(s, &b)); NUTS_TRUE(!b); - NUTS_PASS(nng_close(s)); + NUTS_CLOSE(s); // raw pub only differs in the option setting NUTS_PASS(nng_pub0_open_raw(&s)); diff --git a/src/sp/protocol/reqrep0/req_test.c b/src/sp/protocol/reqrep0/req_test.c index 1dc04a5c..d4dc8c27 100644 --- a/src/sp/protocol/reqrep0/req_test.c +++ b/src/sp/protocol/reqrep0/req_test.c @@ -932,7 +932,7 @@ test_req_ctx_recv_close_socket(void) NUTS_PASS(nng_aio_result(aio)); nng_ctx_recv(ctx, aio); - nng_close(req); + nng_socket_close(req); nng_aio_wait(aio); NUTS_FAIL(nng_aio_result(aio), NNG_ECLOSED); diff --git a/src/sp/protocol/reqrep0/xrep_test.c b/src/sp/protocol/reqrep0/xrep_test.c index 068d64a7..e3ba0f94 100644 --- a/src/sp/protocol/reqrep0/xrep_test.c +++ b/src/sp/protocol/reqrep0/xrep_test.c @@ -142,8 +142,8 @@ test_xrep_validate_peer(void) NUTS_TRUE(nng_stat_type(reject) == NNG_STAT_COUNTER); NUTS_TRUE(nng_stat_value(reject) > 0); - NUTS_PASS(nng_close(s1)); - NUTS_PASS(nng_close(s2)); + NUTS_CLOSE(s1); + NUTS_CLOSE(s2); nng_stats_free(stats); } @@ -353,7 +353,7 @@ test_xrep_ttl_option(void) NUTS_TRUE(nng_socket_set_bool(rep, opt, true) == NNG_EBADTYPE); NUTS_TRUE(nng_socket_get_bool(rep, opt, &b) == NNG_EBADTYPE); - NUTS_TRUE(nng_close(rep) == 0); + NUTS_CLOSE(rep); } static void diff --git a/src/sp/protocol/reqrep0/xreq_test.c b/src/sp/protocol/reqrep0/xreq_test.c index 1f06eb17..b51de556 100644 --- a/src/sp/protocol/reqrep0/xreq_test.c +++ b/src/sp/protocol/reqrep0/xreq_test.c @@ -358,7 +358,7 @@ test_xreq_ttl_option(void) NUTS_TRUE(nng_socket_set_bool(rep, opt, true) == NNG_EBADTYPE); NUTS_TRUE(nng_socket_get_bool(rep, opt, &b) == NNG_EBADTYPE); - NUTS_TRUE(nng_close(rep) == 0); + NUTS_CLOSE(rep); } NUTS_TESTS = { diff --git a/src/sp/protocol/survey0/survey_test.c b/src/sp/protocol/survey0/survey_test.c index 3f122abb..0489bf9f 100644 --- a/src/sp/protocol/survey0/survey_test.c +++ b/src/sp/protocol/survey0/survey_test.c @@ -502,7 +502,7 @@ test_surv_ctx_recv_close_socket(void) NUTS_PASS(nng_aio_result(aio)); nng_ctx_recv(ctx, aio); - nng_close(surv); + nng_socket_close(surv); nng_aio_wait(aio); NUTS_FAIL(nng_aio_result(aio), NNG_ECLOSED); @@ -594,8 +594,8 @@ test_surv_validate_peer(void) NUTS_TRUE(nng_stat_type(reject) == NNG_STAT_COUNTER); NUTS_TRUE(nng_stat_value(reject) > 0); - NUTS_PASS(nng_close(s1)); - NUTS_PASS(nng_close(s2)); + NUTS_CLOSE(s1); + NUTS_CLOSE(s2); nng_stats_free(stats); } |
