diff options
| author | Garrett D'Amore <garrett@damore.org> | 2016-12-27 20:46:32 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2016-12-27 20:46:32 -0800 |
| commit | 123e1439a284716c651eca037b95ba997e6c30db (patch) | |
| tree | fc44cecd5fcb0e0f01532ac8e1ddf4d9499659f6 /src/core/socket.c | |
| parent | 9c8576a3f0357e611c0892dfe1d0d4c2afe73bf2 (diff) | |
| download | nng-123e1439a284716c651eca037b95ba997e6c30db.tar.gz nng-123e1439a284716c651eca037b95ba997e6c30db.tar.bz2 nng-123e1439a284716c651eca037b95ba997e6c30db.zip | |
Send and receive now work.
This fixes a few core issues, and improves readability for the
message queue code as well. inproc delivery of messages works
now.
Diffstat (limited to 'src/core/socket.c')
| -rw-r--r-- | src/core/socket.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/socket.c b/src/core/socket.c index 91c3c03e..aabcab7c 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -61,7 +61,8 @@ nni_reaper(void *arg) // If pipe was a connected (dialer) pipe, // then let the endpoint know so it can try to // reestablish the connection. - if ((ep = pipe->p_ep) != NULL) { + if (((ep = pipe->p_ep) != NULL) && + ((ep->ep_pipe == pipe))) { ep->ep_pipe = NULL; pipe->p_ep = NULL; nni_mutex_enter(&ep->ep_mx); @@ -318,7 +319,9 @@ nni_socket_recvmsg(nni_socket *sock, nni_msg **msgp, nni_time expire) if (rv != 0) { return (rv); } - msg = sock->s_ops.proto_recv_filter(sock->s_data, msg); + if (sock->s_ops.proto_recv_filter != NULL) { + msg = sock->s_ops.proto_recv_filter(sock->s_data, msg); + } if (msg != NULL) { break; } |
