diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-06-23 19:20:08 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-06-23 19:20:08 +0300 |
commit | 3b9aa27625e50dea5fed2644e80ea454605a3006 (patch) | |
tree | 91d3dafe87091205aea2ffa0bf6ef4fb1c43d025 /src/nxt_port_socket.c | |
parent | eaf28db46e81787a89b7f962e8bb53b142747a5e (diff) | |
download | unit-3b9aa27625e50dea5fed2644e80ea454605a3006.tar.gz unit-3b9aa27625e50dea5fed2644e80ea454605a3006.tar.bz2 |
Added mem_pool pointer member to nxt_port_send_msg_t.
To decouple nxt_port_send_msg_t from port.
Diffstat (limited to 'src/nxt_port_socket.c')
-rw-r--r-- | src/nxt_port_socket.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nxt_port_socket.c b/src/nxt_port_socket.c index 71ee315e..2a3a6594 100644 --- a/src/nxt_port_socket.c +++ b/src/nxt_port_socket.c @@ -167,6 +167,7 @@ nxt_port_socket_write(nxt_task_t *task, nxt_port_t *port, nxt_uint_t type, msg->buf = b; msg->fd = fd; msg->share = 0; + msg->mem_pool = port->mem_pool; msg->port_msg.stream = stream; msg->port_msg.pid = nxt_pid; @@ -289,7 +290,7 @@ nxt_port_write_handler(nxt_task_t *task, void *obj, void *data) } else { nxt_queue_remove(link); - nxt_mp_free(port->mem_pool, msg); + nxt_mp_free(msg->mem_pool, msg); } } else if (nxt_slow_path(n == NXT_ERROR)) { |