diff options
Diffstat (limited to 'src/protocol/reqrep0')
| -rw-r--r-- | src/protocol/reqrep0/rep.c | 8 | ||||
| -rw-r--r-- | src/protocol/reqrep0/req.c | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/protocol/reqrep0/rep.c b/src/protocol/reqrep0/rep.c index 5ee6c1be..f62406cd 100644 --- a/src/protocol/reqrep0/rep.c +++ b/src/protocol/reqrep0/rep.c @@ -353,13 +353,13 @@ rep0_pipe_putq_cb(void *arg) } static int -rep0_sock_setopt_raw(void *arg, const void *buf, size_t sz) +rep0_sock_setopt_raw(void *arg, const void *buf, size_t sz, int typ) { rep0_sock *s = arg; int rv; nni_mtx_lock(&s->lk); - rv = nni_setopt_bool(&s->raw, buf, sz); + rv = nni_copyin_bool(&s->raw, buf, sz, typ); nni_mtx_unlock(&s->lk); return (rv); } @@ -372,10 +372,10 @@ rep0_sock_getopt_raw(void *arg, void *buf, size_t *szp, int typ) } static int -rep0_sock_setopt_maxttl(void *arg, const void *buf, size_t sz) +rep0_sock_setopt_maxttl(void *arg, const void *buf, size_t sz, int typ) { rep0_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 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 |
