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/pubsub0/pub.c | 4 ++-- src/protocol/pubsub0/sub.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/protocol/pubsub0') diff --git a/src/protocol/pubsub0/pub.c b/src/protocol/pubsub0/pub.c index 36c27e7f..3f4ecea6 100644 --- a/src/protocol/pubsub0/pub.c +++ b/src/protocol/pubsub0/pub.c @@ -281,10 +281,10 @@ pub0_sock_setopt_raw(void *arg, const void *buf, size_t sz) } static int -pub0_sock_getopt_raw(void *arg, void *buf, size_t *szp) +pub0_sock_getopt_raw(void *arg, void *buf, size_t *szp, int typ) { pub0_sock *s = arg; - return (nni_getopt_bool(s->raw, buf, szp)); + return (nni_copyout_bool(s->raw, buf, szp, typ)); } static void diff --git a/src/protocol/pubsub0/sub.c b/src/protocol/pubsub0/sub.c index cb7b0509..d7e9aea4 100644 --- a/src/protocol/pubsub0/sub.c +++ b/src/protocol/pubsub0/sub.c @@ -283,10 +283,10 @@ sub0_sock_setopt_raw(void *arg, const void *buf, size_t sz) } static int -sub0_sock_getopt_raw(void *arg, void *buf, size_t *szp) +sub0_sock_getopt_raw(void *arg, void *buf, size_t *szp, int typ) { sub0_sock *s = arg; - return (nni_getopt_bool(s->raw, buf, szp)); + return (nni_copyout_bool(s->raw, buf, szp, typ)); } static void -- cgit v1.2.3-70-g09d2