-
-
Notifications
You must be signed in to change notification settings - Fork 497
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
42 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// | ||
// Copyright 2024 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2025 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2018 Capitar IT Group BV <[email protected]> | ||
// Copyright 2018 Devolutions <[email protected]> | ||
// | ||
|
@@ -75,7 +75,7 @@ pipe_reap(void *arg) | |
nni_pipe_rele(p); | ||
} | ||
|
||
int | ||
nng_err | ||
nni_pipe_find(nni_pipe **pp, uint32_t id) | ||
{ | ||
nni_pipe *p; | ||
|
@@ -90,7 +90,7 @@ nni_pipe_find(nni_pipe **pp, uint32_t id) | |
*pp = p; | ||
} | ||
nni_mtx_unlock(&pipes_lk); | ||
return (p == NULL ? NNG_ENOENT : 0); | ||
return (p == NULL ? NNG_ENOENT : NNG_OK); | ||
} | ||
|
||
void | ||
|
@@ -330,11 +330,11 @@ nni_pipe_alloc_listener(void **datap, nni_listener *l) | |
return (0); | ||
} | ||
|
||
int | ||
nng_err | ||
nni_pipe_getopt( | ||
nni_pipe *p, const char *name, void *val, size_t *szp, nni_opt_type t) | ||
{ | ||
int rv; | ||
nng_err rv; | ||
|
||
rv = p->p_tran_ops.p_getopt(p->p_tran_data, name, val, szp, t); | ||
if (rv != NNG_ENOTSUP) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// | ||
// Copyright 2024 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2025 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2018 Capitar IT Group BV <[email protected]> | ||
// | ||
// This software is supplied under the terms of the MIT License, a | ||
|
@@ -1301,51 +1301,51 @@ nng_strerror(nng_err num) | |
return (unknownerrbuf); | ||
} | ||
|
||
static int | ||
static nng_err | ||
pipe_get(nng_pipe p, const char *name, void *val, size_t *szp, nni_type t) | ||
{ | ||
int rv; | ||
nng_err rv; | ||
nni_pipe *pipe; | ||
|
||
if ((rv = nni_pipe_find(&pipe, p.id)) != 0) { | ||
return (rv); | ||
} | ||
rv = nni_pipe_getopt(pipe, name, val, szp, t); | ||
nni_pipe_rele(pipe); | ||
return (rv); | ||
return (NNG_OK); | ||
} | ||
|
||
int | ||
nng_err | ||
nng_pipe_get_int(nng_pipe id, const char *n, int *v) | ||
{ | ||
return (pipe_get(id, n, v, NULL, NNI_TYPE_INT32)); | ||
} | ||
|
||
int | ||
nng_err | ||
nng_pipe_get_bool(nng_pipe id, const char *n, bool *v) | ||
{ | ||
return (pipe_get(id, n, v, NULL, NNI_TYPE_BOOL)); | ||
} | ||
|
||
int | ||
nng_err | ||
nng_pipe_get_size(nng_pipe id, const char *n, size_t *v) | ||
{ | ||
return (pipe_get(id, n, v, NULL, NNI_TYPE_SIZE)); | ||
} | ||
|
||
int | ||
nng_err | ||
nng_pipe_get_string(nng_pipe id, const char *n, char **v) | ||
{ | ||
return (pipe_get(id, n, v, NULL, NNI_TYPE_STRING)); | ||
} | ||
|
||
int | ||
nng_err | ||
nng_pipe_get_ms(nng_pipe id, const char *n, nng_duration *v) | ||
{ | ||
return (pipe_get(id, n, v, NULL, NNI_TYPE_DURATION)); | ||
} | ||
|
||
int | ||
nng_err | ||
nng_pipe_get_addr(nng_pipe id, const char *n, nng_sockaddr *v) | ||
{ | ||
return (pipe_get(id, n, v, NULL, NNI_TYPE_SOCKADDR)); | ||
|
@@ -1388,18 +1388,18 @@ nng_pipe_listener(nng_pipe p) | |
return (l); | ||
} | ||
|
||
int | ||
nng_err | ||
nng_pipe_close(nng_pipe p) | ||
{ | ||
int rv; | ||
nng_err rv; | ||
nni_pipe *pipe; | ||
|
||
if ((rv = nni_pipe_find(&pipe, p.id)) != 0) { | ||
return (rv); | ||
} | ||
nni_pipe_close(pipe); | ||
nni_pipe_rele(pipe); | ||
return (0); | ||
return (NNG_OK); | ||
} | ||
|
||
int | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// | ||
// Copyright 2024 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2025 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2018 Capitar IT Group BV <[email protected]> | ||
// Copyright 2018 Devolutions <[email protected]> | ||
// | ||
|
@@ -577,7 +577,7 @@ static const nni_option inproc_pipe_options[] = { | |
}, | ||
}; | ||
|
||
static int | ||
static nng_err | ||
inproc_pipe_getopt( | ||
void *arg, const char *name, void *v, size_t *szp, nni_type t) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// | ||
// Copyright 2024 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2025 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2018 Capitar IT Group BV <[email protected]> | ||
// Copyright 2019 Devolutions <[email protected]> | ||
// | ||
|
@@ -546,7 +546,7 @@ sfd_tran_pipe_peer(void *arg) | |
return (p->peer); | ||
} | ||
|
||
static int | ||
static nng_err | ||
sfd_tran_pipe_getopt( | ||
void *arg, const char *name, void *buf, size_t *szp, nni_type t) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// | ||
// Copyright 2024 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2025 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2018 Capitar IT Group BV <[email protected]> | ||
// Copyright 2019 Devolutions <[email protected]> | ||
// | ||
|
@@ -938,12 +938,12 @@ static const nni_option tlstran_pipe_opts[] = { | |
}, | ||
}; | ||
|
||
static int | ||
static nng_err | ||
tlstran_pipe_getopt( | ||
void *arg, const char *name, void *buf, size_t *szp, nni_type t) | ||
{ | ||
tlstran_pipe *p = arg; | ||
int rv; | ||
nng_err rv; | ||
|
||
if ((rv = nni_stream_get(p->tls, name, buf, szp, t)) == NNG_ENOTSUP) { | ||
rv = nni_getopt(tlstran_pipe_opts, name, p, buf, szp, t); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright 2024 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2025 Staysail Systems, Inc. <[email protected]> | ||
// | ||
// This software is supplied under the terms of the MIT License, a | ||
// copy of which should be located in the distribution where this | ||
|
@@ -1082,7 +1082,7 @@ static nni_option udp_pipe_options[] = { | |
}, | ||
}; | ||
|
||
static int | ||
static nng_err | ||
udp_pipe_getopt( | ||
void *arg, const char *name, void *buf, size_t *szp, nni_type t) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters