aboutsummaryrefslogtreecommitdiff
path: root/src/transport/tcp
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-02-08 14:16:23 -0800
committerGarrett D'Amore <garrett@damore.org>2018-02-08 18:54:09 -0800
commitd606317f5c028fa8fba5d5384b0ccd90ffa4eab5 (patch)
tree3a6a70f6f2dc81b8722134752716f1c58bd1825c /src/transport/tcp
parente9efefca683b244b40f831c554d7c72a745b8372 (diff)
downloadnng-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/tcp')
-rw-r--r--src/transport/tcp/tcp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/transport/tcp/tcp.c b/src/transport/tcp/tcp.c
index 1504d0ee..475a77ff 100644
--- a/src/transport/tcp/tcp.c
+++ b/src/transport/tcp/tcp.c
@@ -631,19 +631,19 @@ nni_tcp_ep_finish(nni_tcp_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_tcp_pipe_init(&pipe, ep, nni_aio_get_pipe(ep->aio));
+ rv = nni_tcp_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_aio_finish_pipe(aio, pipe);
+ nni_aio_set_output(aio, 0, pipe);
+ nni_aio_finish(aio, 0, 0);
return;
}
if (pipe != NULL) {