summaryrefslogtreecommitdiffhomepage
path: root/src/stream
diff options
context:
space:
mode:
authorVladimir Homutov <vl@nginx.com>2015-04-25 22:44:02 +0300
committerVladimir Homutov <vl@nginx.com>2015-04-25 22:44:02 +0300
commitdf555ffce6fe6416cc874dcd69a64584c6c7f5e8 (patch)
tree197ff71ba0b0d9dfa4da7f70e6c5bb1d18ff3c1c /src/stream
parentd61f21c5e8735da57fb1e1c1a91103e71f5c6207 (diff)
downloadnginx-df555ffce6fe6416cc874dcd69a64584c6c7f5e8.tar.gz
nginx-df555ffce6fe6416cc874dcd69a64584c6c7f5e8.tar.bz2
Core: the ngx_set_connection_log() macro.
The http and stream versions of this macro were identical.
Diffstat (limited to '')
-rw-r--r--src/stream/ngx_stream.c2
-rw-r--r--src/stream/ngx_stream.h10
-rw-r--r--src/stream/ngx_stream_handler.c2
3 files changed, 2 insertions, 12 deletions
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);