From ba5b984528b6c500aed063af7f43ea24fa394f4e Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 27 Sep 2017 18:44:07 -0700 Subject: fixes #85 Protocols need to set msg pipe We looked at other options, but this is the least intrusive, even though it means that the protocols have to set it up. The reason is that transports have different methods of receiving messages, and there is no framework code between the transport and the protocol. --- src/protocol/survey/respond.c | 1 + src/protocol/survey/survey.c | 1 + 2 files changed, 2 insertions(+) (limited to 'src/protocol/survey') diff --git a/src/protocol/survey/respond.c b/src/protocol/survey/respond.c index 70dbd704..fcb067b0 100644 --- a/src/protocol/survey/respond.c +++ b/src/protocol/survey/respond.c @@ -285,6 +285,7 @@ resp_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, p->id); // Store the pipe id in the header, first thing. if (nni_msg_header_append_u32(msg, p->id) != 0) { diff --git a/src/protocol/survey/survey.c b/src/protocol/survey/survey.c index 361b9d37..de9df7a5 100644 --- a/src/protocol/survey/survey.c +++ b/src/protocol/survey/survey.c @@ -244,6 +244,7 @@ surv_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->npipe)); // We yank 4 bytes of body, and move them to the header. if (nni_msg_len(msg) < 4) { -- cgit v1.2.3-70-g09d2