diff options
| author | Garrett D'Amore <garrett@damore.org> | 2025-04-27 23:35:25 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2025-04-27 23:35:25 -0700 |
| commit | 7bb5ab9c4f70c9fa0a67a22c4aee83b0109318c4 (patch) | |
| tree | 5a3036d609404ee5218b6189a89799e70f4623df /src/platform/posix/posix_sockfd.c | |
| parent | 70ae513e4dda50864f7d45b6676549ed5246144d (diff) | |
| download | nng-7bb5ab9c4f70c9fa0a67a22c4aee83b0109318c4.tar.gz nng-7bb5ab9c4f70c9fa0a67a22c4aee83b0109318c4.tar.bz2 nng-7bb5ab9c4f70c9fa0a67a22c4aee83b0109318c4.zip | |
Converted property functions to use nng_err.
Diffstat (limited to 'src/platform/posix/posix_sockfd.c')
| -rw-r--r-- | src/platform/posix/posix_sockfd.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/platform/posix/posix_sockfd.c b/src/platform/posix/posix_sockfd.c index a76ef85f..6762987b 100644 --- a/src/platform/posix/posix_sockfd.c +++ b/src/platform/posix/posix_sockfd.c @@ -327,7 +327,7 @@ sfd_recv(void *arg, nni_aio *aio) nni_mtx_unlock(&c->mtx); } -static int +static nng_err sfd_get_addr(void *arg, void *buf, size_t *szp, nni_type t) { NNI_ARG_UNUSED(arg); @@ -336,46 +336,46 @@ sfd_get_addr(void *arg, void *buf, size_t *szp, nni_type t) return (nni_copyout_sockaddr(&sa, buf, szp, t)); } -static int +static nng_err sfd_get_peer_uid(void *arg, void *buf, size_t *szp, nni_type t) { nni_sfd_conn *c = arg; - int rv; + nng_err rv; int ignore; int id = 0; rv = nni_posix_peerid(c->fd, &id, &ignore, &ignore, &ignore); - if (rv != 0) { + if (rv != NNG_OK) { return (rv); } return (nni_copyout_int(id, buf, szp, t)); } -static int +static nng_err sfd_get_peer_gid(void *arg, void *buf, size_t *szp, nni_type t) { nni_sfd_conn *c = arg; - int rv; + nng_err rv; int ignore; int id = 0; rv = nni_posix_peerid(c->fd, &ignore, &id, &ignore, &ignore); - if (rv != 0) { + if (rv != NNG_OK) { return (rv); } return (nni_copyout_int(id, buf, szp, t)); } -static int +static nng_err sfd_get_peer_zoneid(void *arg, void *buf, size_t *szp, nni_type t) { nni_sfd_conn *c = arg; - int rv; + nng_err rv; int ignore; int id = 0; rv = nni_posix_peerid(c->fd, &ignore, &ignore, &ignore, &id); - if (rv != 0) { + if (rv != NNG_OK) { return (rv); } if (id == -1) { @@ -385,16 +385,16 @@ sfd_get_peer_zoneid(void *arg, void *buf, size_t *szp, nni_type t) return (nni_copyout_int(id, buf, szp, t)); } -static int +static nng_err sfd_get_peer_pid(void *arg, void *buf, size_t *szp, nni_type t) { nni_sfd_conn *c = arg; - int rv; + nng_err rv; int ignore; int id = 0; rv = nni_posix_peerid(c->fd, &ignore, &ignore, &id, &ignore); - if (rv != 0) { + if (rv != NNG_OK) { return (rv); } if (id == -1) { @@ -434,14 +434,14 @@ static const nni_option sfd_options[] = { }, }; -static int +static nng_err sfd_get(void *arg, const char *name, void *buf, size_t *szp, nni_type t) { nni_sfd_conn *c = arg; return (nni_getopt(sfd_options, name, c, buf, szp, t)); } -static int +static nng_err sfd_set(void *arg, const char *name, const void *buf, size_t sz, nni_type t) { nni_sfd_conn *c = arg; |
