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/platform/posix | |
| 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/platform/posix')
| -rw-r--r-- | src/platform/posix/posix_epdesc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/platform/posix/posix_epdesc.c b/src/platform/posix/posix_epdesc.c index 931ed052..b5e65826 100644 --- a/src/platform/posix/posix_epdesc.c +++ b/src/platform/posix/posix_epdesc.c @@ -74,7 +74,8 @@ nni_posix_epdesc_finish(nni_aio *aio, int rv, int newfd) if (rv != 0) { nni_aio_finish_error(aio, rv); } else { - nni_aio_finish_pipe(aio, pd); + nni_aio_set_output(aio, 0, pd); + nni_aio_finish(aio, 0, 0); } } @@ -317,7 +318,6 @@ nni_posix_epdesc_accept(nni_posix_epdesc *ed, nni_aio *aio) // connection is ready for us. There isn't anything else for us to // do really, as that will have been done in listen. nni_mtx_lock(&ed->mtx); - nni_aio_set_pipe(aio, NULL); // If we can't start, it means that the AIO was stopped. if ((rv = nni_aio_start(aio, nni_posix_epdesc_cancel, ed)) != 0) { nni_mtx_unlock(&ed->mtx); @@ -343,7 +343,6 @@ nni_posix_epdesc_connect(nni_posix_epdesc *ed, nni_aio *aio) int fd; nni_mtx_lock(&ed->mtx); - nni_aio_set_pipe(aio, NULL); // If we can't start, it means that the AIO was stopped. if ((rv = nni_aio_start(aio, nni_posix_epdesc_cancel, ed)) != 0) { nni_mtx_unlock(&ed->mtx); |
