diff options
| author | Garrett D'Amore <garrett@damore.org> | 2025-04-27 22:09:42 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2025-04-27 22:17:22 -0700 |
| commit | 70ae513e4dda50864f7d45b6676549ed5246144d (patch) | |
| tree | 4b3af5df7d7aeb2301c31717d9f625e2b0a8ff86 /src/platform/windows | |
| parent | e6848652f9684f044543a3ddf24dab806e34bc7c (diff) | |
| download | nng-70ae513e4dda50864f7d45b6676549ed5246144d.tar.gz nng-70ae513e4dda50864f7d45b6676549ed5246144d.tar.bz2 nng-70ae513e4dda50864f7d45b6676549ed5246144d.zip | |
Transport listen: use nng_err
Diffstat (limited to 'src/platform/windows')
| -rw-r--r-- | src/platform/windows/win_ipclisten.c | 10 | ||||
| -rw-r--r-- | src/platform/windows/win_tcplisten.c | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/platform/windows/win_ipclisten.c b/src/platform/windows/win_ipclisten.c index 56ec5cc3..e8670afe 100644 --- a/src/platform/windows/win_ipclisten.c +++ b/src/platform/windows/win_ipclisten.c @@ -191,11 +191,11 @@ ipc_listener_get( return (nni_getopt(ipc_listener_options, name, l, buf, szp, t)); } -static int +static nng_err ipc_listener_listen(void *arg) { ipc_listener *l = arg; - int rv; + nng_err rv; HANDLE f; char *path; @@ -209,7 +209,7 @@ ipc_listener_listen(void *arg) return (NNG_ECLOSED); } rv = nni_asprintf(&path, IPC_PIPE_PREFIX "%s", l->sa.s_ipc.sa_path); - if (rv != 0) { + if (rv != NNG_OK) { nni_mtx_unlock(&l->mtx); return (rv); } @@ -230,7 +230,7 @@ ipc_listener_listen(void *arg) nni_strfree(path); return (rv); } - if ((rv = nni_win_io_register(f)) != 0) { + if ((rv = nni_win_io_register(f)) != NNG_OK) { CloseHandle(f); nni_mtx_unlock(&l->mtx); nni_strfree(path); @@ -241,7 +241,7 @@ ipc_listener_listen(void *arg) l->path = path; l->started = true; nni_mtx_unlock(&l->mtx); - return (0); + return (NNG_OK); } static void diff --git a/src/platform/windows/win_tcplisten.c b/src/platform/windows/win_tcplisten.c index aa4a18e9..b92470ca 100644 --- a/src/platform/windows/win_tcplisten.c +++ b/src/platform/windows/win_tcplisten.c @@ -130,10 +130,10 @@ tcp_listener_free(void *arg) NNI_FREE_STRUCT(l); } -static int +static nng_err tcp_listener_listen(void *arg) { - int rv; + nng_err rv; BOOL yes; DWORD no; int len; @@ -192,7 +192,7 @@ tcp_listener_listen(void *arg) } l->started = true; nni_mtx_unlock(&l->mtx); - return (0); + return (NNG_OK); } static void |
