From f04cfd27e2d67b0fc89b079410fc11b55b6d1979 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Tue, 29 Aug 2017 14:17:11 -0700 Subject: Add improved getopt functions, pass integers by value. --- src/protocol/pair/pair_v0.c | 2 +- src/protocol/pair/pair_v1.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/protocol/pair') diff --git a/src/protocol/pair/pair_v0.c b/src/protocol/pair/pair_v0.c index 486ce43b..277d5cb1 100644 --- a/src/protocol/pair/pair_v0.c +++ b/src/protocol/pair/pair_v0.c @@ -250,7 +250,7 @@ pair0_sock_getopt(void *arg, int opt, void *buf, size_t *szp) int rv; if (opt == nng_optid_raw) { - rv = nni_getopt_int(&s->raw, buf, szp); + rv = nni_getopt_int(s->raw, buf, szp); } else { rv = NNG_ENOTSUP; } diff --git a/src/protocol/pair/pair_v1.c b/src/protocol/pair/pair_v1.c index d6c8ea75..68dbc6f7 100644 --- a/src/protocol/pair/pair_v1.c +++ b/src/protocol/pair/pair_v1.c @@ -432,15 +432,15 @@ pair1_sock_getopt(void *arg, int opt, void *buf, size_t *szp) if (opt == nng_optid_raw) { nni_mtx_lock(&s->mtx); - rv = nni_getopt_int(&s->raw, buf, szp); + rv = nni_getopt_int(s->raw, buf, szp); nni_mtx_unlock(&s->mtx); } else if (opt == nng_optid_maxttl) { nni_mtx_lock(&s->mtx); - rv = nni_getopt_int(&s->ttl, buf, szp); + rv = nni_getopt_int(s->ttl, buf, szp); nni_mtx_unlock(&s->mtx); } else if (opt == nng_optid_pair1_poly) { nni_mtx_lock(&s->mtx); - rv = nni_getopt_int(&s->poly, buf, szp); + rv = nni_getopt_int(s->poly, buf, szp); nni_mtx_unlock(&s->mtx); } return (rv); -- cgit v1.2.3-70-g09d2