From df555ffce6fe6416cc874dcd69a64584c6c7f5e8 Mon Sep 17 00:00:00 2001 From: Vladimir Homutov Date: Sat, 25 Apr 2015 22:44:02 +0300 Subject: Core: the ngx_set_connection_log() macro. The http and stream versions of this macro were identical. --- src/stream/ngx_stream.c | 2 +- src/stream/ngx_stream.h | 10 ---------- src/stream/ngx_stream_handler.c | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) (limited to 'src/stream') diff --git a/src/stream/ngx_stream.c b/src/stream/ngx_stream.c index f982170c1..e5ffcf9bc 100644 --- a/src/stream/ngx_stream.c +++ b/src/stream/ngx_stream.c @@ -370,8 +370,8 @@ ngx_stream_optimize_servers(ngx_conf_t *cf, ngx_array_t *ports) ls->pool_size = 256; cscf = addr->ctx->srv_conf[ngx_stream_core_module.ctx_index]; - ls->logp = cscf->error_log; + ls->logp = cscf->error_log; ls->log.data = &ls->addr_text; ls->log.handler = ngx_accept_log_error; diff --git a/src/stream/ngx_stream.h b/src/stream/ngx_stream.h index 6ac1fd586..83a43a41f 100644 --- a/src/stream/ngx_stream.h +++ b/src/stream/ngx_stream.h @@ -192,16 +192,6 @@ typedef struct { ->main_conf[module.ctx_index]: \ NULL) -#define ngx_stream_set_connection_log(c, l) \ - \ - c->log->file = l->file; \ - c->log->next = l->next; \ - c->log->writer = l->writer; \ - c->log->wdata = l->wdata; \ - if (!(c->log->log_level & NGX_LOG_DEBUG_CONNECTION)) { \ - c->log->log_level = l->log_level; \ - } - void ngx_stream_init_connection(ngx_connection_t *c); void ngx_stream_close_connection(ngx_connection_t *c); diff --git a/src/stream/ngx_stream_handler.c b/src/stream/ngx_stream_handler.c index c05e905c4..2be5183c1 100644 --- a/src/stream/ngx_stream_handler.c +++ b/src/stream/ngx_stream_handler.c @@ -130,7 +130,7 @@ ngx_stream_init_connection(ngx_connection_t *c) cscf = ngx_stream_get_module_srv_conf(s, ngx_stream_core_module); - ngx_stream_set_connection_log(c, cscf->error_log); + ngx_set_connection_log(c, cscf->error_log); len = ngx_sock_ntop(c->sockaddr, c->socklen, text, NGX_SOCKADDR_STRLEN, 1); -- cgit