From 505a9bce029e51540739c853a6c9eef0ecfb2e90 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 4 Apr 2018 11:07:56 -0700 Subject: fixes #329 type checking not done for setopt --- src/core/endpt.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/core/endpt.c') diff --git a/src/core/endpt.c b/src/core/endpt.c index d4bc9b01..0cb59a14 100644 --- a/src/core/endpt.c +++ b/src/core/endpt.c @@ -598,13 +598,9 @@ nni_ep_setopt(nni_ep *ep, const char *name, const void *val, size_t sz, int t) if (eo->eo_setopt == NULL) { return (NNG_EREADONLY); } - if ((t != NNI_TYPE_OPAQUE) && - (eo->eo_type != NNI_TYPE_OPAQUE) && (t != eo->eo_type)) { - return (NNG_EBADTYPE); - } nni_mtx_lock(&ep->ep_mtx); - rv = eo->eo_setopt(ep->ep_data, val, sz); + rv = eo->eo_setopt(ep->ep_data, val, sz, t); nni_mtx_unlock(&ep->ep_mtx); return (rv); } -- cgit v1.2.3-70-g09d2