summaryrefslogtreecommitdiffhomepage
path: root/src/nginext/nxt_go_run_ctx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nginext/nxt_go_run_ctx.c')
-rw-r--r--src/nginext/nxt_go_run_ctx.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nginext/nxt_go_run_ctx.c b/src/nginext/nxt_go_run_ctx.c
index 2d284bc5..0788b0d1 100644
--- a/src/nginext/nxt_go_run_ctx.c
+++ b/src/nginext/nxt_go_run_ctx.c
@@ -168,6 +168,8 @@ nxt_go_ctx_init(nxt_go_run_ctx_t *ctx, nxt_port_msg_t *port_msg,
ctx->wport_msg.type = NXT_PORT_MSG_DATA;
ctx->wport_msg.mmap = 1;
+ ctx->wmmap_msg = (nxt_port_mmap_msg_t *) ( &ctx->wport_msg + 1 );
+
return nxt_go_ctx_init_rbuf(ctx);
}
@@ -197,6 +199,7 @@ nxt_go_ctx_add_msg(nxt_go_run_ctx_t *ctx, nxt_port_msg_t *port_msg, size_t size)
nxt_int_t
nxt_go_ctx_flush(nxt_go_run_ctx_t *ctx, int last)
{
+ int i;
nxt_int_t rc;
if (last != 0) {
@@ -205,6 +208,13 @@ nxt_go_ctx_flush(nxt_go_run_ctx_t *ctx, int last)
nxt_go_debug("flush buffers (%d)", last);
+ for (i = 0; i < ctx->nwbuf; i++) {
+ nxt_port_mmap_msg_t *m = ctx->wmmap_msg + i;
+
+ nxt_go_debug(" mmap_msg[%d]={%d, %d, %d}", i,
+ m->mmap_id, m->chunk_id, m->size);
+ }
+
rc = nxt_go_port_send(ctx->msg.port_msg->pid, ctx->msg.port_msg->reply_port,
&ctx->wport_msg, sizeof(nxt_port_msg_t) +
ctx->nwbuf * sizeof(nxt_port_mmap_msg_t), NULL, 0);