aboutsummaryrefslogtreecommitdiff
path: root/src/supplemental/http
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/supplemental/http
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/supplemental/http')
-rw-r--r--src/supplemental/http/http_client.c2
-rw-r--r--src/supplemental/http/http_public.c2
-rw-r--r--src/supplemental/http/http_server.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/supplemental/http/http_client.c b/src/supplemental/http/http_client.c
index 918b7b09..9058b6e2 100644
--- a/src/supplemental/http/http_client.c
+++ b/src/supplemental/http/http_client.c
@@ -44,7 +44,7 @@ http_conn_done(void *arg)
nni_mtx_lock(&c->mtx);
rv = nni_aio_result(c->connaio);
- p = rv == 0 ? nni_aio_get_pipe(c->connaio) : NULL;
+ p = rv == 0 ? nni_aio_get_output(c->connaio, 0) : NULL;
if ((aio = nni_list_first(&c->aios)) == NULL) {
if (p != NULL) {
nni_plat_tcp_pipe_fini(p);
diff --git a/src/supplemental/http/http_public.c b/src/supplemental/http/http_public.c
index 9d23ed8e..5437a000 100644
--- a/src/supplemental/http/http_public.c
+++ b/src/supplemental/http/http_public.c
@@ -737,7 +737,7 @@ void
nng_http_client_connect(nng_http_client *cli, nng_aio *aio)
{
#ifdef NNG_SUPP_HTTP
- return (nni_http_client_connect(cli, aio));
+ nni_http_client_connect(cli, aio);
#else
NNI_ARG_UNUSED(cli);
if (nni_aio_start(aio, NULL, NULL)) {
diff --git a/src/supplemental/http/http_server.c b/src/supplemental/http/http_server.c
index 4a426c8c..4c89708d 100644
--- a/src/supplemental/http/http_server.c
+++ b/src/supplemental/http/http_server.c
@@ -719,7 +719,7 @@ http_server_acccb(void *arg)
nni_mtx_unlock(&s->mtx);
return;
}
- tcp = nni_aio_get_pipe(aio);
+ tcp = nni_aio_get_output(aio, 0);
if (s->closed) {
// If we're closing, then reject this one.
nni_plat_tcp_pipe_fini(tcp);