summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_port.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-06-23 19:19:41 +0300
committerMax Romanov <max.romanov@nginx.com>2017-06-23 19:19:41 +0300
commitb13cdb0faae250e6aa8c9e46be03e3162f7de27d (patch)
tree81d9f6d98b07e8a806b0fe2fa42402d32190ae24 /src/nxt_port.c
parentac43bfcc72b3a92abc8d935dce8306b05b8c8185 (diff)
downloadunit-b13cdb0faae250e6aa8c9e46be03e3162f7de27d.tar.gz
unit-b13cdb0faae250e6aa8c9e46be03e3162f7de27d.tar.bz2
Store mem_pool in buf->data instead of port for consistency.
Diffstat (limited to 'src/nxt_port.c')
-rw-r--r--src/nxt_port.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nxt_port.c b/src/nxt_port.c
index fb4d65a6..e9553bd6 100644
--- a/src/nxt_port.c
+++ b/src/nxt_port.c
@@ -106,7 +106,7 @@ nxt_port_send_new_port(nxt_task_t *task, nxt_runtime_t *rt,
nxt_debug(task, "send new port %FD to process %PI",
new_port->socket.fd, process->pid);
- b->data = port;
+ b->data = port->mem_pool;
b->completion_handler = nxt_port_new_port_buf_completion;
b->mem.free += sizeof(nxt_port_msg_new_port_t);
msg = (nxt_port_msg_new_port_t *) b->mem.pos;
@@ -128,15 +128,15 @@ nxt_port_send_new_port(nxt_task_t *task, nxt_runtime_t *rt,
static void
nxt_port_new_port_buf_completion(nxt_task_t *task, void *obj, void *data)
{
- nxt_buf_t *b;
- nxt_port_t *port;
+ nxt_mp_t *mp;
+ nxt_buf_t *b;
b = obj;
- port = b->data;
+ mp = b->data;
/* TODO: b->mem.pos */
- nxt_buf_free(port->mem_pool, b);
+ nxt_buf_free(mp, b);
}