aboutsummaryrefslogtreecommitdiff
path: root/src/core/endpt.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-04-04 11:07:56 -0700
committerGarrett D'Amore <garrett@damore.org>2018-04-04 11:07:56 -0700
commit505a9bce029e51540739c853a6c9eef0ecfb2e90 (patch)
treed907679b6ab99bcb5da919db3d005d4976590c21 /src/core/endpt.c
parent0aa1de1316b46bb4af23fdf26759bca08008eaf5 (diff)
downloadnng-505a9bce029e51540739c853a6c9eef0ecfb2e90.tar.gz
nng-505a9bce029e51540739c853a6c9eef0ecfb2e90.tar.bz2
nng-505a9bce029e51540739c853a6c9eef0ecfb2e90.zip
fixes #329 type checking not done for setopt
Diffstat (limited to 'src/core/endpt.c')
-rw-r--r--src/core/endpt.c6
1 files changed, 1 insertions, 5 deletions
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);
}