diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-12-29 16:16:57 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-12-29 16:16:57 -0800 |
| commit | 5b35daaf2fe6c6fbe0b15740efbffe16ff278e6c (patch) | |
| tree | 24c383103cc3ff3e98e2e8179d0633e9b2f6010a /src/core/transport.c | |
| parent | d3bd35ab49ad74528fd9e34cce9016d74dd91943 (diff) | |
| download | nng-5b35daaf2fe6c6fbe0b15740efbffe16ff278e6c.tar.gz nng-5b35daaf2fe6c6fbe0b15740efbffe16ff278e6c.tar.bz2 nng-5b35daaf2fe6c6fbe0b15740efbffe16ff278e6c.zip | |
IPC option rework (pipe/conn) to reduce code duplication.
Diffstat (limited to 'src/core/transport.c')
| -rw-r--r-- | src/core/transport.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/transport.c b/src/core/transport.c index 185ab779..da192416 100644 --- a/src/core/transport.c +++ b/src/core/transport.c @@ -125,6 +125,11 @@ nni_tran_chkopt(const char *name, const void *v, size_t sz, int typ) // Generally we look for endpoint options. We check both // dialers and listeners. dops = t->t_tran.tran_dialer; + if ((dops->d_setopt != NULL) && + ((rv = dops->d_setopt(NULL, name, v, sz, typ)) != + NNG_ENOTSUP)) { + return (rv); + } for (o = dops->d_options; o && o->o_name != NULL; o++) { if (strcmp(name, o->o_name) != 0) { continue; @@ -138,6 +143,11 @@ nni_tran_chkopt(const char *name, const void *v, size_t sz, int typ) return (rv); } lops = t->t_tran.tran_listener; + if ((lops->l_setopt != NULL) && + ((rv = lops->l_setopt(NULL, name, v, sz, typ)) != + NNG_ENOTSUP)) { + return (rv); + } for (o = lops->l_options; o && o->o_name != NULL; o++) { if (strcmp(name, o->o_name) != 0) { continue; |
