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_router.c | |
parent | 1449e27cb42a5b3ca2d2106a39fee3f1d54a340e (diff) | |
download | unit-838d9946ac2d9c9a9ba41d5b88209bfc5f2325d0.tar.gz unit-838d9946ac2d9c9a9ba41d5b88209bfc5f2325d0.tar.bz2 |
Introducing named port message handlers to avoid misprints.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_router.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/nxt_router.c b/src/nxt_router.c index 34078511..d9ba2d24 100644 --- a/src/nxt_router.c +++ b/src/nxt_router.c @@ -1783,21 +1783,9 @@ nxt_router_engine_post(nxt_event_engine_t *engine, nxt_work_t *jobs) } -static nxt_port_handler_t nxt_router_app_port_handlers[] = { - NULL, /* NXT_PORT_MSG_QUIT */ - NULL, /* NXT_PORT_MSG_NEW_PORT */ - NULL, /* NXT_PORT_MSG_CHANGE_FILE */ - /* TODO: remove mmap_handler from app ports */ - nxt_port_mmap_handler, /* NXT_PORT_MSG_MMAP */ - nxt_port_rpc_handler, /* NXT_PORT_MSG_DATA */ - NULL, /* NXT_PORT_MSG_REMOVE_PID */ - 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, +static nxt_port_handlers_t nxt_router_app_port_handlers = { + .mmap = nxt_port_mmap_handler, + .data = nxt_port_rpc_handler, }; @@ -1844,7 +1832,7 @@ nxt_router_thread_start(void *data) engine->port = port; - nxt_port_enable(task, port, nxt_router_app_port_handlers); + nxt_port_enable(task, port, &nxt_router_app_port_handlers); nxt_event_engine_start(engine); } |