diff options
Diffstat (limited to 'src/core/transport.c')
| -rw-r--r-- | src/core/transport.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/core/transport.c b/src/core/transport.c index 54c4bcfe..071ea0c7 100644 --- a/src/core/transport.c +++ b/src/core/transport.c @@ -1,6 +1,7 @@ // -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> +// Copyright 2019 Devolutions <info@devolutions.net> // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -122,6 +123,16 @@ nni_tran_chkopt(const char *name, const void *v, size_t sz, int typ) const nni_tran_listener_ops *lops; const nni_option * o; + // Check option entry point is cleaner than endpoint hacks. + if (t->t_tran.tran_checkopt != NULL) { + rv = t->t_tran.tran_checkopt(name, v, sz, typ); + if (rv != NNG_ENOTSUP) { + nni_mtx_unlock(&nni_tran_lk); + return (rv); + } + continue; + } + // Generally we look for endpoint options. We check both // dialers and listeners. dops = t->t_tran.tran_dialer; |
