diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-02-08 14:16:23 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-02-08 18:54:09 -0800 |
| commit | d606317f5c028fa8fba5d5384b0ccd90ffa4eab5 (patch) | |
| tree | 3a6a70f6f2dc81b8722134752716f1c58bd1825c /src/transport/ipc | |
| parent | e9efefca683b244b40f831c554d7c72a745b8372 (diff) | |
| download | nng-d606317f5c028fa8fba5d5384b0ccd90ffa4eab5.tar.gz nng-d606317f5c028fa8fba5d5384b0ccd90ffa4eab5.tar.bz2 nng-d606317f5c028fa8fba5d5384b0ccd90ffa4eab5.zip | |
fixes #171 Refactor aio to use generic data fields
This addresses the use of the pipe special field, and eliminates it.
The message APIs (recvmsg, sendmsg) need to be updated as well still,
but I want to handle that as part of a separate issue.
While here we fixed various compiler warnings, etc.
Diffstat (limited to 'src/transport/ipc')
| -rw-r--r-- | src/transport/ipc/ipc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/transport/ipc/ipc.c b/src/transport/ipc/ipc.c index 6475e43b..9ebf3145 100644 --- a/src/transport/ipc/ipc.c +++ b/src/transport/ipc/ipc.c @@ -579,20 +579,20 @@ nni_ipc_ep_finish(nni_ipc_ep *ep) if ((rv = nni_aio_result(ep->aio)) != 0) { goto done; } - NNI_ASSERT(nni_aio_get_pipe(ep->aio) != NULL); + NNI_ASSERT(nni_aio_get_output(ep->aio, 0) != NULL); // Attempt to allocate the parent pipe. If this fails we'll // drop the connection (ENOMEM probably). - rv = nni_ipc_pipe_init(&pipe, ep, nni_aio_get_pipe(ep->aio)); + rv = nni_ipc_pipe_init(&pipe, ep, nni_aio_get_output(ep->aio, 0)); done: - nni_aio_set_pipe(ep->aio, NULL); aio = ep->user_aio; ep->user_aio = NULL; if ((aio != NULL) && (rv == 0)) { NNI_ASSERT(pipe != NULL); - nni_aio_finish_pipe(aio, pipe); + nni_aio_set_output(aio, 0, pipe); + nni_aio_finish(aio, 0, 0); return; } |
