From 763b8deee1fd38566b85d4745a83adae245d9b26 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 21 Jun 2017 14:04:16 -0700 Subject: Make APIs for holding references more consistent. --- src/protocol/pubsub/pub.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/protocol/pubsub/pub.c') diff --git a/src/protocol/pubsub/pub.c b/src/protocol/pubsub/pub.c index 8ca7f0f9..5ea16d2d 100644 --- a/src/protocol/pubsub/pub.c +++ b/src/protocol/pubsub/pub.c @@ -156,9 +156,9 @@ nni_pub_pipe_start(void *arg) nni_list_append(&pub->pipes, pp); // Start the receiver and the queue reader. - nni_pipe_incref(pp->pipe); + nni_pipe_hold(pp->pipe); nni_pipe_aio_recv(pp->pipe, &pp->aio_recv); - nni_pipe_incref(pp->pipe); + nni_pipe_hold(pp->pipe); nni_msgq_aio_get(pp->sendq, &pp->aio_getq); return (0); @@ -229,7 +229,7 @@ nni_pub_pipe_recv_cb(void *arg) if (nni_aio_result(&pp->aio_recv) != 0) { nni_pipe_close(pp->pipe); - nni_pipe_decref(pp->pipe); + nni_pipe_rele(pp->pipe); return; } @@ -246,7 +246,7 @@ nni_pub_pipe_getq_cb(void *arg) if (nni_aio_result(&pp->aio_getq) != 0) { nni_pipe_close(pp->pipe); - nni_pipe_decref(pp->pipe); + nni_pipe_rele(pp->pipe); return; } @@ -266,7 +266,7 @@ nni_pub_pipe_send_cb(void *arg) nni_msg_free(pp->aio_send.a_msg); pp->aio_send.a_msg = NULL; nni_pipe_close(pp->pipe); - nni_pipe_decref(pp->pipe); + nni_pipe_rele(pp->pipe); return; } -- cgit v1.2.3-70-g09d2