aboutsummaryrefslogtreecommitdiff
path: root/src/sp/transport/ipc
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2021-08-01 08:25:58 -0700
committerGarrett D'Amore <garrett@damore.org>2021-08-01 08:25:58 -0700
commit524a3f6ec6e1e921c16ff18997ae494cad09f860 (patch)
tree17eb6bf491a1c75fa510392eb7df76769e36d163 /src/sp/transport/ipc
parent5e5881391bfa6e261ab0f6349a5f12a526e2f293 (diff)
downloadnng-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/ipc')
-rw-r--r--src/sp/transport/ipc/ipc.c11
1 files changed, 9 insertions, 2 deletions
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,9 +1148,18 @@ 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
nni_sp_tran_register(&ipc_tran_unix);
@@ -1158,6 +1167,4 @@ nng_ipc_register(void)
#ifdef NNG_HAVE_ABSTRACT_SOCKETS
nni_sp_tran_register(&ipc_tran_abstract);
#endif
-
- return (0);
}