From 6df40cb6eea9a4220d61c4c927ce5a857a12a338 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Tue, 20 Mar 2018 18:38:54 -0700 Subject: fixes #301 String option handling for getopt --- src/protocol/pair1/pair.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/protocol/pair1') diff --git a/src/protocol/pair1/pair.c b/src/protocol/pair1/pair.c index 564118ae..ee67cf7b 100644 --- a/src/protocol/pair1/pair.c +++ b/src/protocol/pair1/pair.c @@ -408,10 +408,10 @@ pair1_sock_setopt_raw(void *arg, const void *buf, size_t sz) } static int -pair1_sock_getopt_raw(void *arg, void *buf, size_t *szp) +pair1_sock_getopt_raw(void *arg, void *buf, size_t *szp, int typ) { pair1_sock *s = arg; - return (nni_getopt_bool(s->raw, buf, szp)); + return (nni_copyout_bool(s->raw, buf, szp, typ)); } static int @@ -426,10 +426,10 @@ pair1_sock_setopt_maxttl(void *arg, const void *buf, size_t sz) } static int -pair1_sock_getopt_maxttl(void *arg, void *buf, size_t *szp) +pair1_sock_getopt_maxttl(void *arg, void *buf, size_t *szp, int typ) { pair1_sock *s = arg; - return (nni_getopt_int(s->ttl, buf, szp)); + return (nni_copyout_int(s->ttl, buf, szp, typ)); } static int @@ -444,10 +444,10 @@ pair1_sock_setopt_poly(void *arg, const void *buf, size_t sz) } static int -pair1_sock_getopt_poly(void *arg, void *buf, size_t *szp) +pair1_sock_getopt_poly(void *arg, void *buf, size_t *szp, int typ) { pair1_sock *s = arg; - return (nni_getopt_bool(s->poly, buf, szp)); + return (nni_copyout_bool(s->poly, buf, szp, typ)); } static void -- cgit v1.2.3-70-g09d2