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/pipeline/pull.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/pipeline/pull.c')
| -rw-r--r-- | src/protocol/pipeline/pull.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/protocol/pipeline/pull.c b/src/protocol/pipeline/pull.c index b569253d..eb14be81 100644 --- a/src/protocol/pipeline/pull.c +++ b/src/protocol/pipeline/pull.c @@ -107,7 +107,7 @@ nni_pull_pipe_start(void *arg) nni_pull_pipe *pp = arg; // Start the pending pull... - nni_pipe_incref(pp->pipe); + nni_pipe_hold(pp->pipe); nni_pull_recv(pp); return (0); @@ -134,7 +134,7 @@ nni_pull_recv_cb(void *arg) if (nni_aio_result(aio) != 0) { // Failed to get a message, probably the pipe is closed. nni_pipe_close(pp->pipe); - nni_pipe_decref(pp->pipe); + nni_pipe_rele(pp->pipe); return; } @@ -158,7 +158,7 @@ nni_pull_putq_cb(void *arg) nni_msg_free(aio->a_msg); aio->a_msg = NULL; nni_pipe_close(pp->pipe); - nni_pipe_decref(pp->pipe); + nni_pipe_rele(pp->pipe); return; } @@ -173,7 +173,7 @@ nni_pull_recv(nni_pull_pipe *pp) // Schedule the aio with callback. if (nni_pipe_aio_recv(pp->pipe, &pp->recv_aio) != 0) { nni_pipe_close(pp->pipe); - nni_pipe_decref(pp->pipe); + nni_pipe_rele(pp->pipe); } } |
