diff options
author | Valentin Bartenev <vbart@nginx.com> | 2019-02-25 15:10:44 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2019-02-25 15:10:44 +0300 |
commit | d8c0a0dbe25c2467b6b8ba866cfd67613ff2014a (patch) | |
tree | cbecdc8718132c66fc680bde7fcccb2f5ce0631a /src/nxt_router.c | |
parent | c5563d142dd189050aee08a00e3079e3e7ff14a7 (diff) | |
download | unit-d8c0a0dbe25c2467b6b8ba866cfd67613ff2014a.tar.gz unit-d8c0a0dbe25c2467b6b8ba866cfd67613ff2014a.tar.bz2 |
Disabled useless code in nxt_router_listen_socket_error().
It doesn't do anything useful, among creating a JSON message and logging it
to debug log. Besides that it causes segmentation fault if the RPC handler
is triggered with an empty buffer due to exiting of the main process.
Diffstat (limited to 'src/nxt_router.c')
-rw-r--r-- | src/nxt_router.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/nxt_router.c b/src/nxt_router.c index 8b93e15d..5621abec 100644 --- a/src/nxt_router.c +++ b/src/nxt_router.c @@ -1982,13 +1982,18 @@ static void nxt_router_listen_socket_error(nxt_task_t *task, nxt_port_recv_msg_t *msg, void *data) { + nxt_socket_rpc_t *rpc; + nxt_router_temp_conf_t *tmcf; + + rpc = data; + tmcf = rpc->temp_conf; + +#if 0 u_char *p; size_t size; uint8_t error; nxt_buf_t *in, *out; nxt_sockaddr_t *sa; - nxt_socket_rpc_t *rpc; - nxt_router_temp_conf_t *tmcf; static nxt_str_t socket_errors[] = { nxt_string("ListenerSystem"), @@ -2000,9 +2005,7 @@ nxt_router_listen_socket_error(nxt_task_t *task, nxt_port_recv_msg_t *msg, nxt_string("ListenerPath"), }; - rpc = data; sa = rpc->socket_conf->listen->sockaddr; - tmcf = rpc->temp_conf; in = nxt_buf_chk_make_plain(tmcf->mem_pool, msg->buf, msg->size); @@ -2030,6 +2033,7 @@ nxt_router_listen_socket_error(nxt_task_t *task, nxt_port_recv_msg_t *msg, &socket_errors[error], in->mem.free - p, p); nxt_debug(task, "%*s", out->mem.free - out->mem.pos, out->mem.pos); +#endif nxt_router_conf_error(task, tmcf); } |