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_lib.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_lib.c')
-rw-r--r-- | src/nginext/nxt_go_lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nginext/nxt_go_lib.c b/src/nginext/nxt_go_lib.c index 57c3da8e..87f583d7 100644 --- a/src/nginext/nxt_go_lib.c +++ b/src/nginext/nxt_go_lib.c @@ -189,8 +189,8 @@ nxt_go_ready() port_msg.stream = atol(go_stream); port_msg.pid = getpid(); port_msg.reply_port = 0; - port_msg.type = NXT_PORT_MSG_READY; - port_msg.last = 0; + port_msg.type = _NXT_PORT_MSG_READY; + port_msg.last = 1; port_msg.mmap = 0; nxt_go_master_send(&port_msg, sizeof(port_msg), NULL, 0); |