diff options
Diffstat (limited to '')
-rw-r--r-- | src/nxt_worker_process.c | 84 |
1 files changed, 25 insertions, 59 deletions
diff --git a/src/nxt_worker_process.c b/src/nxt_worker_process.c index 1a7d0c53..c66eb179 100644 --- a/src/nxt_worker_process.c +++ b/src/nxt_worker_process.c @@ -20,71 +20,37 @@ static void nxt_worker_process_sigquit_handler(nxt_task_t *task, void *obj, void *data); -nxt_port_handler_t nxt_worker_process_port_handlers[] = { - nxt_worker_process_quit_handler, - nxt_port_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_app_process_port_handlers = { + .quit = nxt_worker_process_quit_handler, + .new_port = nxt_port_new_port_handler, + .change_file = nxt_port_change_log_file_handler, + .mmap = nxt_port_mmap_handler, + .data = nxt_port_app_data_handler, + .remove_pid = nxt_port_remove_pid_handler, }; -nxt_port_handler_t nxt_app_process_port_handlers[] = { - nxt_worker_process_quit_handler, - nxt_port_new_port_handler, - nxt_port_change_log_file_handler, - nxt_port_mmap_handler, - nxt_port_app_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_router_process_port_handlers = { + .quit = nxt_worker_process_quit_handler, + .new_port = nxt_router_new_port_handler, + .change_file = nxt_port_change_log_file_handler, + .mmap = nxt_port_mmap_handler, + .data = nxt_router_conf_data_handler, + .remove_pid = nxt_router_remove_pid_handler, + .rpc_ready = nxt_port_rpc_handler, + .rpc_error = nxt_port_rpc_handler, }; -nxt_port_handler_t nxt_router_process_port_handlers[] = { - nxt_worker_process_quit_handler, - nxt_router_new_port_handler, - nxt_port_change_log_file_handler, - nxt_port_mmap_handler, - nxt_router_conf_data_handler, - nxt_router_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_handler_t nxt_discovery_process_port_handlers[] = { - nxt_worker_process_quit_handler, - nxt_port_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_discovery_process_port_handlers = { + .quit = nxt_worker_process_quit_handler, + .new_port = nxt_port_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, }; |