diff options
| author | Garrett D'Amore <garrett@damore.org> | 2020-01-08 20:34:26 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2020-01-08 21:16:30 -0800 |
| commit | b21d7805523a407a14567017edbdef57ca81781f (patch) | |
| tree | e07f08bdc047ee4dfb057b670766e3de5bf2f981 /src/supplemental/tls | |
| parent | 8479b4c8861c77cfd9eb64e724615605bdd1cbcb (diff) | |
| download | nng-b21d7805523a407a14567017edbdef57ca81781f.tar.gz nng-b21d7805523a407a14567017edbdef57ca81781f.tar.bz2 nng-b21d7805523a407a14567017edbdef57ca81781f.zip | |
fixes #1094 Consider in-lining task and aio
This only does it for rep, but it also has changes that should increase
the overall test coverage for the REP protocol
Diffstat (limited to 'src/supplemental/tls')
| -rw-r--r-- | src/supplemental/tls/mbedtls/tls.c | 10 | ||||
| -rw-r--r-- | src/supplemental/tls/tls_common.c | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/supplemental/tls/mbedtls/tls.c b/src/supplemental/tls/mbedtls/tls.c index d49c9de5..b0ac6ec5 100644 --- a/src/supplemental/tls/mbedtls/tls.c +++ b/src/supplemental/tls/mbedtls/tls.c @@ -290,12 +290,12 @@ tls_reap(void *arg) } nni_aio_stop(tls->tcp_send); nni_aio_stop(tls->tcp_recv); - nni_aio_fini(tls->com.aio); + nni_aio_free(tls->com.aio); // And finalize / free everything. nng_stream_free(tls->tcp); - nni_aio_fini(tls->tcp_send); - nni_aio_fini(tls->tcp_recv); + nni_aio_free(tls->tcp_send); + nni_aio_free(tls->tcp_recv); mbedtls_ssl_free(&tls->ctx); nng_tls_config_free(tls->com.cfg); @@ -349,8 +349,8 @@ nni_tls_start(nng_stream *arg, nng_stream *tcp) tp->tcp = tcp; - if (((rv = nni_aio_init(&tp->tcp_send, tls_send_cb, tp)) != 0) || - ((rv = nni_aio_init(&tp->tcp_recv, tls_recv_cb, tp)) != 0)) { + if (((rv = nni_aio_alloc(&tp->tcp_send, tls_send_cb, tp)) != 0) || + ((rv = nni_aio_alloc(&tp->tcp_recv, tls_recv_cb, tp)) != 0)) { return (rv); } diff --git a/src/supplemental/tls/tls_common.c b/src/supplemental/tls/tls_common.c index 39a4bff0..7cccc1e9 100644 --- a/src/supplemental/tls/tls_common.c +++ b/src/supplemental/tls/tls_common.c @@ -1,5 +1,5 @@ // -// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // Copyright 2019 Devolutions <info@devolutions.net> // @@ -110,7 +110,7 @@ tls_dialer_dial(void *arg, nng_aio *aio) } com = (void *) tls; - if ((rv = nni_aio_init(&com->aio, tls_conn_cb, tls)) != 0) { + if ((rv = nni_aio_alloc(&com->aio, tls_conn_cb, tls)) != 0) { nni_aio_finish_error(aio, rv); nng_stream_free(tls); return; @@ -394,7 +394,7 @@ tls_listener_accept(void *arg, nng_aio *aio) return; } com = (void *) tls; - if ((rv = nni_aio_init(&com->aio, tls_conn_cb, tls)) != 0) { + if ((rv = nni_aio_alloc(&com->aio, tls_conn_cb, tls)) != 0) { nni_aio_finish_error(aio, rv); nng_stream_free(tls); return; |
