diff options
| -rw-r--r-- | include/nng/nng.h | 2 | ||||
| -rw-r--r-- | src/nng.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/nng/nng.h b/include/nng/nng.h index e2200f17..b3c5ae14 100644 --- a/include/nng/nng.h +++ b/include/nng/nng.h @@ -337,7 +337,7 @@ typedef void (*nng_pipe_cb)(nng_pipe, nng_pipe_ev, void *); // nng_pipe_notify registers a callback to be executed when the // given event is triggered. To watch for different events, register // multiple times. Each event can have at most one callback registered. -NNG_DECL int nng_pipe_notify(nng_socket, nng_pipe_ev, nng_pipe_cb, void *); +NNG_DECL nng_err nng_pipe_notify(nng_socket, nng_pipe_ev, nng_pipe_cb, void *); // nng_listen creates a listening endpoint with no special options, // and starts it listening. It is functionally equivalent to the legacy @@ -1174,10 +1174,10 @@ nng_socket_raw(nng_socket id, bool *rawp) return (0); } -int +nng_err nng_pipe_notify(nng_socket s, nng_pipe_ev ev, nng_pipe_cb cb, void *arg) { - int rv; + nng_err rv; nni_sock *sock; if ((rv = nni_sock_find(&sock, s.id)) != 0) { @@ -1186,7 +1186,7 @@ nng_pipe_notify(nng_socket s, nng_pipe_ev ev, nng_pipe_cb cb, void *arg) nni_sock_set_pipe_cb(sock, ev, cb, arg); nni_sock_rele(sock); - return (0); + return (NNG_OK); } void |
