From a2801adffebb6a3679e41789b38ba925ed32832b Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 6 Jan 2017 08:18:50 -0800 Subject: Message API was awkward. The use of a single function to get both size and length actually turned out to be awkward to use; better to have separate functions to get each. While here, disable some of the initialization/fork checks, because it turns out they aren't needed. --- src/transport/inproc/inproc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/transport/inproc') diff --git a/src/transport/inproc/inproc.c b/src/transport/inproc/inproc.c index 530e7ccf..df9c9aa9 100644 --- a/src/transport/inproc/inproc.c +++ b/src/transport/inproc/inproc.c @@ -137,12 +137,13 @@ nni_inproc_pipe_send(void *arg, nni_msg *msg) // 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); + h = nni_msg_header(msg); + l = nni_msg_header_len(msg); if (nni_msg_prepend(msg, h, l) != 0) { nni_msg_free(msg); return (0); // Pretend we sent it. } - nni_msg_trim_header(msg, l); + nni_msg_trunc_header(msg, l); return (nni_msgq_put(pipe->wq, msg)); } -- cgit v1.2.3-70-g09d2