diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-09-15 20:30:34 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-09-15 20:30:34 +0300 |
commit | 838d9946ac2d9c9a9ba41d5b88209bfc5f2325d0 (patch) | |
tree | cd6458cb2362ef2550fc5629407f5f623c11945f /src/nxt_controller.c | |
parent | 1449e27cb42a5b3ca2d2106a39fee3f1d54a340e (diff) | |
download | unit-838d9946ac2d9c9a9ba41d5b88209bfc5f2325d0.tar.gz unit-838d9946ac2d9c9a9ba41d5b88209bfc5f2325d0.tar.bz2 |
Introducing named port message handlers to avoid misprints.
Diffstat (limited to 'src/nxt_controller.c')
-rw-r--r-- | src/nxt_controller.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/nxt_controller.c b/src/nxt_controller.c index a97f4098..c8bfbad6 100644 --- a/src/nxt_controller.c +++ b/src/nxt_controller.c @@ -99,20 +99,15 @@ static const nxt_event_conn_state_t nxt_controller_conn_write_state; static const nxt_event_conn_state_t nxt_controller_conn_close_state; -nxt_port_handler_t nxt_controller_process_port_handlers[] = { - nxt_worker_process_quit_handler, - nxt_controller_process_new_port_handler, - nxt_port_change_log_file_handler, - nxt_port_mmap_handler, - nxt_port_data_handler, - nxt_port_remove_pid_handler, - NULL, /* NXT_PORT_MSG_READY */ - NULL, /* NXT_PORT_MSG_START_WORKER */ - NULL, /* NXT_PORT_MSG_SOCKET */ - NULL, /* NXT_PORT_MSG_MODULES */ - NULL, /* NXT_PORT_MSG_CONF_STORE */ - nxt_port_rpc_handler, - nxt_port_rpc_handler, +nxt_port_handlers_t nxt_controller_process_port_handlers = { + .quit = nxt_worker_process_quit_handler, + .new_port = nxt_controller_process_new_port_handler, + .change_file = nxt_port_change_log_file_handler, + .mmap = nxt_port_mmap_handler, + .data = nxt_port_data_handler, + .remove_pid = nxt_port_remove_pid_handler, + .rpc_ready = nxt_port_rpc_handler, + .rpc_error = nxt_port_rpc_handler, }; |