diff options
| author | Garrett D'Amore <garrett@damore.org> | 2021-07-30 17:37:30 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2021-07-31 11:18:28 -0700 |
| commit | 5e5881391bfa6e261ab0f6349a5f12a526e2f293 (patch) | |
| tree | 4e89313b00110a31bfc1736b565b154c81c6f409 /src/sp/transport/zerotier | |
| parent | 2c3700cce723f964cab23ae1d8b73aaa66702f50 (diff) | |
| download | nng-5e5881391bfa6e261ab0f6349a5f12a526e2f293.tar.gz nng-5e5881391bfa6e261ab0f6349a5f12a526e2f293.tar.bz2 nng-5e5881391bfa6e261ab0f6349a5f12a526e2f293.zip | |
Simplify the SP transport initialization process.
Diffstat (limited to 'src/sp/transport/zerotier')
| -rw-r--r-- | src/sp/transport/zerotier/zerotier.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/sp/transport/zerotier/zerotier.c b/src/sp/transport/zerotier/zerotier.c index 4e752020..15c0fe9f 100644 --- a/src/sp/transport/zerotier/zerotier.c +++ b/src/sp/transport/zerotier/zerotier.c @@ -1579,12 +1579,11 @@ done: return (0); } -static int +static void zt_tran_init(void) { nni_mtx_init(&zt_lk); NNI_LIST_INIT(&zt_nodes, zt_node, zn_link); - return (0); } static void @@ -3233,7 +3232,6 @@ static nni_tran_listener_ops zt_listener_ops = { // This is the ZeroTier transport linkage, and should be the // only global symbol in this entire file. static struct nni_tran zt_tran = { - .tran_version = NNI_TRANSPORT_VERSION, .tran_scheme = "zt", .tran_dialer = &zt_dialer_ops, .tran_listener = &zt_listener_ops, @@ -3245,5 +3243,6 @@ static struct nni_tran zt_tran = { int nng_zt_register(void) { - return (nni_tran_register(&zt_tran)); + nni_tran_register(&zt_tran); + return (0); } |
