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/tcp/tcp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/sp/transport/tcp') diff --git a/src/sp/transport/tcp/tcp.c b/src/sp/transport/tcp/tcp.c index 3aa20f38..e2e7fbce 100644 --- a/src/sp/transport/tcp/tcp.c +++ b/src/sp/transport/tcp/tcp.c @@ -1247,11 +1247,18 @@ static nni_sp_tran tcp6_tran = { .tran_fini = tcptran_fini, }; +#ifndef NNG_ELIDE_DEPRECATED int nng_tcp_register(void) +{ + return (nni_init()); +} +#endif + +void +nni_sp_tcp_register(void) { nni_sp_tran_register(&tcp_tran); nni_sp_tran_register(&tcp4_tran); nni_sp_tran_register(&tcp6_tran); - return (0); } -- cgit v1.2.3-70-g09d2