aboutsummaryrefslogtreecommitdiff
path: root/src/protocol/reqrep0/req.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-03-20 18:38:54 -0700
committerGarrett D'Amore <garrett@damore.org>2018-03-20 18:42:23 -0700
commit6df40cb6eea9a4220d61c4c927ce5a857a12a338 (patch)
treeac4b7ecbcb41a456eb4d0429fc180047656371ba /src/protocol/reqrep0/req.c
parent9ca901c1b70b17d851426483d9f54611cfa8e395 (diff)
downloadnng-6df40cb6eea9a4220d61c4c927ce5a857a12a338.tar.gz
nng-6df40cb6eea9a4220d61c4c927ce5a857a12a338.tar.bz2
nng-6df40cb6eea9a4220d61c4c927ce5a857a12a338.zip
fixes #301 String option handling for getopt
Diffstat (limited to 'src/protocol/reqrep0/req.c')
-rw-r--r--src/protocol/reqrep0/req.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/protocol/reqrep0/req.c b/src/protocol/reqrep0/req.c
index 63ae07a0..659578d4 100644
--- a/src/protocol/reqrep0/req.c
+++ b/src/protocol/reqrep0/req.c
@@ -257,10 +257,10 @@ req0_sock_setopt_raw(void *arg, const void *buf, size_t sz)
}
static int
-req0_sock_getopt_raw(void *arg, void *buf, size_t *szp)
+req0_sock_getopt_raw(void *arg, void *buf, size_t *szp, int typ)
{
req0_sock *s = arg;
- return (nni_getopt_bool(s->raw, buf, szp));
+ return (nni_copyout_bool(s->raw, buf, szp, typ));
}
static int
@@ -271,10 +271,10 @@ req0_sock_setopt_maxttl(void *arg, const void *buf, size_t sz)
}
static int
-req0_sock_getopt_maxttl(void *arg, void *buf, size_t *szp)
+req0_sock_getopt_maxttl(void *arg, void *buf, size_t *szp, int typ)
{
req0_sock *s = arg;
- return (nni_getopt_int(s->ttl, buf, szp));
+ return (nni_copyout_int(s->ttl, buf, szp, typ));
}
static int
@@ -285,10 +285,10 @@ req0_sock_setopt_resendtime(void *arg, const void *buf, size_t sz)
}
static int
-req0_sock_getopt_resendtime(void *arg, void *buf, size_t *szp)
+req0_sock_getopt_resendtime(void *arg, void *buf, size_t *szp, int typ)
{
req0_sock *s = arg;
- return (nni_getopt_ms(s->retry, buf, szp));
+ return (nni_copyout_ms(s->retry, buf, szp, typ));
}
// Raw and cooked mode differ in the way they send messages out.