diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-08-02 13:10:48 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-08-02 13:10:48 +0300 |
commit | 3812ffd336414904affc43d29229b04a2d6d8ae6 (patch) | |
tree | f12fca86a5e4280bd75234776cac80c9b9902d0b /src/nginext/nxt_go_port_memory.c | |
parent | a7ef8481fcda2f2dc5b0b84a93e66bce62c83918 (diff) | |
download | unit-3812ffd336414904affc43d29229b04a2d6d8ae6.tar.gz unit-3812ffd336414904affc43d29229b04a2d6d8ae6.tar.bz2 |
Added bit flags to type parameter of nxt_port_socket_write().
NXT_PORT_MSG_LAST - mark message as last;
NXT_PORT_MSG_CLOSE_FD - close fd right after send;
Type constants altered to include last flag for single buffer messages.
Last sign is critical for coming port RPC layer. Handlers unregistered on last
message. Create sync buffer is not convenient, extra parameter is better.
Diffstat (limited to 'src/nginext/nxt_go_port_memory.c')
-rw-r--r-- | src/nginext/nxt_go_port_memory.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nginext/nxt_go_port_memory.c b/src/nginext/nxt_go_port_memory.c index 7e3f7a1a..dbdf5f73 100644 --- a/src/nginext/nxt_go_port_memory.c +++ b/src/nginext/nxt_go_port_memory.c @@ -112,8 +112,8 @@ nxt_go_new_port_mmap(nxt_go_process_t *process, nxt_port_id_t id) port_msg.stream = 0; port_msg.pid = getpid(); port_msg.reply_port = 0; - port_msg.type = NXT_PORT_MSG_MMAP; - port_msg.last = 0; + port_msg.type = _NXT_PORT_MSG_MMAP; + port_msg.last = 1; port_msg.mmap = 0; cmsg.cm.cmsg_len = CMSG_LEN(sizeof(int)); |