aboutsummaryrefslogtreecommitdiff
path: root/src/protocol/reqrep
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-08-29 14:17:11 -0700
committerGarrett D'Amore <garrett@damore.org>2017-09-22 12:33:03 -0700
commitf04cfd27e2d67b0fc89b079410fc11b55b6d1979 (patch)
treeb177a2fd79de4f1293e54e7a4d6990a135f0d65b /src/protocol/reqrep
parent72147bcfbdc568bc58877e0904b92013d82a2acd (diff)
downloadnng-f04cfd27e2d67b0fc89b079410fc11b55b6d1979.tar.gz
nng-f04cfd27e2d67b0fc89b079410fc11b55b6d1979.tar.bz2
nng-f04cfd27e2d67b0fc89b079410fc11b55b6d1979.zip
Add improved getopt functions, pass integers by value.
Diffstat (limited to 'src/protocol/reqrep')
-rw-r--r--src/protocol/reqrep/rep.c4
-rw-r--r--src/protocol/reqrep/req.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/protocol/reqrep/rep.c b/src/protocol/reqrep/rep.c
index 14a3e46b..c26be0b0 100644
--- a/src/protocol/reqrep/rep.c
+++ b/src/protocol/reqrep/rep.c
@@ -362,9 +362,9 @@ rep_sock_getopt(void *arg, int opt, void *buf, size_t *szp)
int rv = NNG_ENOTSUP;
if (opt == nng_optid_maxttl) {
- rv = nni_getopt_int(&s->ttl, buf, szp);
+ rv = nni_getopt_int(s->ttl, buf, szp);
} else if (opt == nng_optid_raw) {
- rv = nni_getopt_int(&s->raw, buf, szp);
+ rv = nni_getopt_int(s->raw, buf, szp);
}
return (rv);
}
diff --git a/src/protocol/reqrep/req.c b/src/protocol/reqrep/req.c
index 5da5003f..1b68c6dd 100644
--- a/src/protocol/reqrep/req.c
+++ b/src/protocol/reqrep/req.c
@@ -273,13 +273,13 @@ req_sock_getopt(void *arg, int opt, void *buf, size_t *szp)
int rv = NNG_ENOTSUP;
if (opt == nng_optid_req_resendtime) {
- rv = nni_getopt_usec(&s->retry, buf, szp);
+ rv = nni_getopt_usec(s->retry, buf, szp);
} else if (opt == nng_optid_raw) {
- rv = nni_getopt_int(&s->raw, buf, szp);
+ rv = nni_getopt_int(s->raw, buf, szp);
} else if (opt == nng_optid_maxttl) {
- rv = nni_getopt_int(&s->ttl, buf, szp);
+ rv = nni_getopt_int(s->ttl, buf, szp);
}
return (rv);