nxt_router.c (319:e5a65b58101f) nxt_router.c (320:d385755599d6)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Valentin V. Bartenev
5 * Copyright (C) NGINX, Inc.
6 */
7
8#include <nxt_router.h>

--- 1769 unchanged lines hidden (view full) ---

1778 next = work->next;
1779 work->next = NULL;
1780
1781 nxt_event_engine_post(engine, work);
1782 }
1783}
1784
1785
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Valentin V. Bartenev
5 * Copyright (C) NGINX, Inc.
6 */
7
8#include <nxt_router.h>

--- 1769 unchanged lines hidden (view full) ---

1778 next = work->next;
1779 work->next = NULL;
1780
1781 nxt_event_engine_post(engine, work);
1782 }
1783}
1784
1785
1786static nxt_port_handler_t nxt_router_app_port_handlers[] = {
1787 NULL, /* NXT_PORT_MSG_QUIT */
1788 NULL, /* NXT_PORT_MSG_NEW_PORT */
1789 NULL, /* NXT_PORT_MSG_CHANGE_FILE */
1790 /* TODO: remove mmap_handler from app ports */
1791 nxt_port_mmap_handler, /* NXT_PORT_MSG_MMAP */
1792 nxt_port_rpc_handler, /* NXT_PORT_MSG_DATA */
1793 NULL, /* NXT_PORT_MSG_REMOVE_PID */
1794 NULL, /* NXT_PORT_MSG_READY */
1795 NULL, /* NXT_PORT_MSG_START_WORKER */
1796 NULL, /* NXT_PORT_MSG_SOCKET */
1797 NULL, /* NXT_PORT_MSG_MODULES */
1798 NULL, /* NXT_PORT_MSG_CONF_STORE */
1799 nxt_port_rpc_handler,
1800 nxt_port_rpc_handler,
1786static nxt_port_handlers_t nxt_router_app_port_handlers = {
1787 .mmap = nxt_port_mmap_handler,
1788 .data = nxt_port_rpc_handler,
1801};
1802
1803
1804static void
1805nxt_router_thread_start(void *data)
1806{
1807 nxt_int_t ret;
1808 nxt_port_t *port;

--- 30 unchanged lines hidden (view full) ---

1839 ret = nxt_port_socket_init(task, port, 0);
1840 if (nxt_slow_path(ret != NXT_OK)) {
1841 nxt_mp_release(port->mem_pool, port);
1842 return;
1843 }
1844
1845 engine->port = port;
1846
1789};
1790
1791
1792static void
1793nxt_router_thread_start(void *data)
1794{
1795 nxt_int_t ret;
1796 nxt_port_t *port;

--- 30 unchanged lines hidden (view full) ---

1827 ret = nxt_port_socket_init(task, port, 0);
1828 if (nxt_slow_path(ret != NXT_OK)) {
1829 nxt_mp_release(port->mem_pool, port);
1830 return;
1831 }
1832
1833 engine->port = port;
1834
1847 nxt_port_enable(task, port, nxt_router_app_port_handlers);
1835 nxt_port_enable(task, port, &nxt_router_app_port_handlers);
1848
1849 nxt_event_engine_start(engine);
1850}
1851
1852
1853static void
1854nxt_router_listen_socket_create(nxt_task_t *task, void *obj, void *data)
1855{

--- 1696 unchanged lines hidden ---
1836
1837 nxt_event_engine_start(engine);
1838}
1839
1840
1841static void
1842nxt_router_listen_socket_create(nxt_task_t *task, void *obj, void *data)
1843{

--- 1696 unchanged lines hidden ---