diff options
| author | Garrett D'Amore <garrett@damore.org> | 2021-08-01 08:25:58 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2021-08-01 08:25:58 -0700 |
| commit | 524a3f6ec6e1e921c16ff18997ae494cad09f860 (patch) | |
| tree | 17eb6bf491a1c75fa510392eb7df76769e36d163 /src/sp/transport/inproc | |
| parent | 5e5881391bfa6e261ab0f6349a5f12a526e2f293 (diff) | |
| download | nng-524a3f6ec6e1e921c16ff18997ae494cad09f860.tar.gz nng-524a3f6ec6e1e921c16ff18997ae494cad09f860.tar.bz2 nng-524a3f6ec6e1e921c16ff18997ae494cad09f860.zip | |
Fix premature transport registration. Mark it deprecated.
Originally the idea was to better support having the transports
be separate loadable modules. This isn't needed for the builtin
transports, so we make the explicit initialization of them
deprecated, and document it as such.
Diffstat (limited to 'src/sp/transport/inproc')
| -rw-r--r-- | src/sp/transport/inproc/inproc.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/sp/transport/inproc/inproc.c b/src/sp/transport/inproc/inproc.c index a67d6d18..971b8877 100644 --- a/src/sp/transport/inproc/inproc.c +++ b/src/sp/transport/inproc/inproc.c @@ -313,9 +313,9 @@ inproc_listener_init(void **epp, nni_url *url, nni_listener *nlistener) } nni_mtx_init(&ep->mtx); - ep->listener = true; - ep->proto = nni_sock_proto_id(sock); - ep->rcvmax = 0; + ep->listener = true; + ep->proto = nni_sock_proto_id(sock); + ep->rcvmax = 0; NNI_LIST_INIT(&ep->clients, inproc_ep, node); nni_aio_list_init(&ep->aios); @@ -683,9 +683,16 @@ struct nni_sp_tran nni_inproc_tran = { .tran_fini = inproc_fini, }; +#ifndef NNG_ELIDE_DEPRECATED int nng_inproc_register(void) { + return (nni_init()); +} +#endif + +void +nni_sp_inproc_register(void) +{ nni_sp_tran_register(&nni_inproc_tran); - return (0); } |
