From 524a3f6ec6e1e921c16ff18997ae494cad09f860 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 1 Aug 2021 08:25:58 -0700 Subject: 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. --- src/sp/transport/ipc/ipc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/sp/transport/ipc/ipc.c') diff --git a/src/sp/transport/ipc/ipc.c b/src/sp/transport/ipc/ipc.c index 502943a5..8ed4ac94 100644 --- a/src/sp/transport/ipc/ipc.c +++ b/src/sp/transport/ipc/ipc.c @@ -1148,8 +1148,17 @@ static nni_sp_tran ipc_tran_abstract = { }; #endif + +#ifndef NNG_ELIDE_DEPRECATED int nng_ipc_register(void) +{ + return (nni_init()); +} +#endif + +void +nni_sp_ipc_register(void) { nni_sp_tran_register(&ipc_tran); #ifdef NNG_PLATFORM_POSIX @@ -1158,6 +1167,4 @@ nng_ipc_register(void) #ifdef NNG_HAVE_ABSTRACT_SOCKETS nni_sp_tran_register(&ipc_tran_abstract); #endif - - return (0); } -- cgit v1.2.3-70-g09d2