diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-12-15 21:23:26 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-12-15 21:23:26 -0800 |
| commit | ab460d51aee7cedd0a8d17553741b3a6dc836dc7 (patch) | |
| tree | f2214ae3ecbed6110293021620d4328235ef93ee /src/sp/transport.c | |
| parent | a43eb958e47f4c70725299845a3b7c69bbba9467 (diff) | |
| download | nng-ab460d51aee7cedd0a8d17553741b3a6dc836dc7.tar.gz nng-ab460d51aee7cedd0a8d17553741b3a6dc836dc7.tar.bz2 nng-ab460d51aee7cedd0a8d17553741b3a6dc836dc7.zip | |
transports: all transports use the new inline approach
We can retire the old approach that used separate allocations,
and all of the supporting code. This also gives us a more
natural signature for the end point initializations.
Diffstat (limited to 'src/sp/transport.c')
| -rw-r--r-- | src/sp/transport.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sp/transport.c b/src/sp/transport.c index 178cc748..6d515967 100644 --- a/src/sp/transport.c +++ b/src/sp/transport.c @@ -22,6 +22,7 @@ void nni_sp_tran_register(nni_sp_tran *tran) { #ifndef NDEBUG + NNI_ASSERT(tran->tran_pipe->p_size != 0); NNI_ASSERT(tran->tran_pipe->p_init != NULL); NNI_ASSERT(tran->tran_pipe->p_fini != NULL); NNI_ASSERT(tran->tran_pipe->p_stop != NULL); @@ -31,6 +32,7 @@ nni_sp_tran_register(nni_sp_tran *tran) NNI_ASSERT(tran->tran_pipe->p_peer != NULL); if (tran->tran_dialer != NULL) { + NNI_ASSERT(tran->tran_dialer->d_size != 0); NNI_ASSERT(tran->tran_dialer->d_init != NULL); NNI_ASSERT(tran->tran_dialer->d_fini != NULL); NNI_ASSERT(tran->tran_dialer->d_close != NULL); @@ -41,6 +43,7 @@ nni_sp_tran_register(nni_sp_tran *tran) } if (tran->tran_listener != NULL) { + NNI_ASSERT(tran->tran_listener->l_size != 0); NNI_ASSERT(tran->tran_listener->l_init != NULL); NNI_ASSERT(tran->tran_listener->l_fini != NULL); NNI_ASSERT(tran->tran_listener->l_bind != NULL); |
