diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-06-21 14:04:16 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-06-21 14:04:16 -0700 |
| commit | 763b8deee1fd38566b85d4745a83adae245d9b26 (patch) | |
| tree | 00404dbc8e6c07fc5a9d8e07f353beff3adefd5a /src/protocol/pubsub/pub.c | |
| parent | f81c7e8cc84bd43bfc3cc5e41f773a0078870312 (diff) | |
| download | nng-763b8deee1fd38566b85d4745a83adae245d9b26.tar.gz nng-763b8deee1fd38566b85d4745a83adae245d9b26.tar.bz2 nng-763b8deee1fd38566b85d4745a83adae245d9b26.zip | |
Make APIs for holding references more consistent.
Diffstat (limited to 'src/protocol/pubsub/pub.c')
| -rw-r--r-- | src/protocol/pubsub/pub.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |
