aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/inproc/inproc.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/transport/inproc/inproc.c b/src/transport/inproc/inproc.c
index ff0e9a2e..530e7ccf 100644
--- a/src/transport/inproc/inproc.c
+++ b/src/transport/inproc/inproc.c
@@ -132,7 +132,17 @@ static int
nni_inproc_pipe_send(void *arg, nni_msg *msg)
{
nni_inproc_pipe *pipe = arg;
-
+ char *h;
+ size_t l;
+
+ // We need to move any header data to the body, because the other
+ // side won't know what to do otherwise.
+ h = nni_msg_header(msg, &l);
+ if (nni_msg_prepend(msg, h, l) != 0) {
+ nni_msg_free(msg);
+ return (0); // Pretend we sent it.
+ }
+ nni_msg_trim_header(msg, l);
return (nni_msgq_put(pipe->wq, msg));
}