diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-04-04 11:07:56 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-04-04 11:07:56 -0700 |
| commit | 505a9bce029e51540739c853a6c9eef0ecfb2e90 (patch) | |
| tree | d907679b6ab99bcb5da919db3d005d4976590c21 /src/protocol/reqrep0/req.c | |
| parent | 0aa1de1316b46bb4af23fdf26759bca08008eaf5 (diff) | |
| download | nng-505a9bce029e51540739c853a6c9eef0ecfb2e90.tar.gz nng-505a9bce029e51540739c853a6c9eef0ecfb2e90.tar.bz2 nng-505a9bce029e51540739c853a6c9eef0ecfb2e90.zip | |
fixes #329 type checking not done for setopt
Diffstat (limited to 'src/protocol/reqrep0/req.c')
| -rw-r--r-- | src/protocol/reqrep0/req.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/protocol/reqrep0/req.c b/src/protocol/reqrep0/req.c index 659578d4..0a5b566a 100644 --- a/src/protocol/reqrep0/req.c +++ b/src/protocol/reqrep0/req.c @@ -250,10 +250,10 @@ req0_pipe_stop(void *arg) } static int -req0_sock_setopt_raw(void *arg, const void *buf, size_t sz) +req0_sock_setopt_raw(void *arg, const void *buf, size_t sz, int typ) { req0_sock *s = arg; - return (nni_setopt_bool(&s->raw, buf, sz)); + return (nni_copyin_bool(&s->raw, buf, sz, typ)); } static int @@ -264,10 +264,10 @@ req0_sock_getopt_raw(void *arg, void *buf, size_t *szp, int typ) } static int -req0_sock_setopt_maxttl(void *arg, const void *buf, size_t sz) +req0_sock_setopt_maxttl(void *arg, const void *buf, size_t sz, int typ) { req0_sock *s = arg; - return (nni_setopt_int(&s->ttl, buf, sz, 1, 255)); + return (nni_copyin_int(&s->ttl, buf, sz, 1, 255, typ)); } static int @@ -278,10 +278,10 @@ req0_sock_getopt_maxttl(void *arg, void *buf, size_t *szp, int typ) } static int -req0_sock_setopt_resendtime(void *arg, const void *buf, size_t sz) +req0_sock_setopt_resendtime(void *arg, const void *buf, size_t sz, int typ) { req0_sock *s = arg; - return (nni_setopt_ms(&s->retry, buf, sz)); + return (nni_copyin_ms(&s->retry, buf, sz, typ)); } static int |
