diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-03-20 18:38:54 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-03-20 18:42:23 -0700 |
| commit | 6df40cb6eea9a4220d61c4c927ce5a857a12a338 (patch) | |
| tree | ac4b7ecbcb41a456eb4d0429fc180047656371ba /src/core/pipe.c | |
| parent | 9ca901c1b70b17d851426483d9f54611cfa8e395 (diff) | |
| download | nng-6df40cb6eea9a4220d61c4c927ce5a857a12a338.tar.gz nng-6df40cb6eea9a4220d61c4c927ce5a857a12a338.tar.bz2 nng-6df40cb6eea9a4220d61c4c927ce5a857a12a338.zip | |
fixes #301 String option handling for getopt
Diffstat (limited to 'src/core/pipe.c')
| -rw-r--r-- | src/core/pipe.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/core/pipe.c b/src/core/pipe.c index 40720906..a4148c65 100644 --- a/src/core/pipe.c +++ b/src/core/pipe.c @@ -297,11 +297,7 @@ nni_pipe_getopt(nni_pipe *p, const char *name, void *val, size_t *szp, int typ) if (strcmp(po->po_name, name) != 0) { continue; } - if ((typ != NNI_TYPE_OPAQUE) && - (po->po_type != NNI_TYPE_OPAQUE) && (typ != po->po_type)) { - return (NNG_EBADTYPE); - } - return (po->po_getopt(p->p_tran_data, val, szp)); + return (po->po_getopt(p->p_tran_data, val, szp, typ)); } // Maybe the endpoint knows? return (nni_ep_getopt(p->p_ep, name, val, szp, typ)); |
