aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nng.c6
-rw-r--r--src/sp/transport/ipc/ipc.c10
2 files changed, 7 insertions, 9 deletions
diff --git a/src/nng.c b/src/nng.c
index 7cd06b77..363d4d28 100644
--- a/src/nng.c
+++ b/src/nng.c
@@ -1360,12 +1360,6 @@ nng_pipe_get_size(nng_pipe id, const char *n, size_t *v)
}
int
-nng_pipe_get_uint64(nng_pipe id, const char *n, uint64_t *v)
-{
- return (pipe_get(id, n, v, NULL, NNI_TYPE_UINT64));
-}
-
-int
nng_pipe_get_string(nng_pipe id, const char *n, char **v)
{
return (pipe_get(id, n, v, NULL, NNI_TYPE_STRING));
diff --git a/src/sp/transport/ipc/ipc.c b/src/sp/transport/ipc/ipc.c
index 997e1712..a7b816a6 100644
--- a/src/sp/transport/ipc/ipc.c
+++ b/src/sp/transport/ipc/ipc.c
@@ -172,6 +172,10 @@ ipc_pipe_nego_cb(void *arg)
int rv;
nni_mtx_lock(&ep->mtx);
+ if (ep->closed) {
+ rv = NNG_ECLOSED;
+ goto error;
+ }
if ((rv = nni_aio_result(aio)) != 0) {
goto error;
}
@@ -337,9 +341,9 @@ ipc_pipe_recv_cb(void *arg)
// Make sure the message payload is not too big. If it is
// the caller will shut down the pipe.
if ((len > p->rcv_max) && (p->rcv_max > 0)) {
- uint64_t pid;
- char peer[64] = "";
- if (nng_stream_get_uint64(
+ int pid;
+ char peer[64] = "";
+ if (nng_stream_get_int(
p->conn, NNG_OPT_PEER_PID, &pid) == 0) {
snprintf(peer, sizeof(peer), " from PID %lu",
(unsigned long) pid);