aboutsummaryrefslogtreecommitdiff
path: root/src/sp/protocol/survey0/respond.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2025-04-27 23:35:25 -0700
committerGarrett D'Amore <garrett@damore.org>2025-04-27 23:35:25 -0700
commit7bb5ab9c4f70c9fa0a67a22c4aee83b0109318c4 (patch)
tree5a3036d609404ee5218b6189a89799e70f4623df /src/sp/protocol/survey0/respond.c
parent70ae513e4dda50864f7d45b6676549ed5246144d (diff)
downloadnng-7bb5ab9c4f70c9fa0a67a22c4aee83b0109318c4.tar.gz
nng-7bb5ab9c4f70c9fa0a67a22c4aee83b0109318c4.tar.bz2
nng-7bb5ab9c4f70c9fa0a67a22c4aee83b0109318c4.zip
Converted property functions to use nng_err.
Diffstat (limited to 'src/sp/protocol/survey0/respond.c')
-rw-r--r--src/sp/protocol/survey0/respond.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/sp/protocol/survey0/respond.c b/src/sp/protocol/survey0/respond.c
index ace2962a..f50ccb6b 100644
--- a/src/sp/protocol/survey0/respond.c
+++ b/src/sp/protocol/survey0/respond.c
@@ -557,27 +557,28 @@ drop:
nni_pipe_recv(p->npipe, &p->aio_recv);
}
-static int
+static nng_err
resp0_sock_set_max_ttl(void *arg, const void *buf, size_t sz, nni_opt_type t)
{
resp0_sock *s = arg;
int ttl;
- int rv;
+ nng_err rv;
- if ((rv = nni_copyin_int(&ttl, buf, sz, 1, NNI_MAX_MAX_TTL, t)) == 0) {
+ if ((rv = nni_copyin_int(&ttl, buf, sz, 1, NNI_MAX_MAX_TTL, t)) ==
+ NNG_OK) {
nni_atomic_set(&s->ttl, ttl);
}
return (rv);
}
-static int
+static nng_err
resp0_sock_get_max_ttl(void *arg, void *buf, size_t *szp, nni_opt_type t)
{
resp0_sock *s = arg;
return (nni_copyout_int(nni_atomic_get(&s->ttl), buf, szp, t));
}
-static int
+static nng_err
resp0_sock_get_sendfd(void *arg, int *fdp)
{
resp0_sock *s = arg;
@@ -585,7 +586,7 @@ resp0_sock_get_sendfd(void *arg, int *fdp)
return (nni_pollable_getfd(&s->writable, fdp));
}
-static int
+static nng_err
resp0_sock_get_recvfd(void *arg, int *fdp)
{
resp0_sock *s = arg;