aboutsummaryrefslogtreecommitdiff
path: root/src/protocol/reqrep
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol/reqrep')
-rw-r--r--src/protocol/reqrep/rep.c2
-rw-r--r--src/protocol/reqrep/req.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/protocol/reqrep/rep.c b/src/protocol/reqrep/rep.c
index c26be0b0..6641c58f 100644
--- a/src/protocol/reqrep/rep.c
+++ b/src/protocol/reqrep/rep.c
@@ -275,6 +275,8 @@ rep_pipe_recv_cb(void *arg)
msg = nni_aio_get_msg(p->aio_recv);
nni_aio_set_msg(p->aio_recv, NULL);
+ nni_msg_set_pipe(msg, nni_pipe_id(p->pipe));
+
// Store the pipe id in the header, first thing.
rv = nni_msg_header_append_u32(msg, nni_pipe_id(p->pipe));
if (rv != 0) {
diff --git a/src/protocol/reqrep/req.c b/src/protocol/reqrep/req.c
index 1b68c6dd..c2008a9a 100644
--- a/src/protocol/reqrep/req.c
+++ b/src/protocol/reqrep/req.c
@@ -405,6 +405,7 @@ req_recv_cb(void *arg)
msg = nni_aio_get_msg(p->aio_recv);
nni_aio_set_msg(p->aio_recv, NULL);
+ nni_msg_set_pipe(msg, nni_pipe_id(p->pipe));
// We yank 4 bytes of body, and move them to the header.
if (nni_msg_len(msg) < 4) {