summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-09-23 19:29:22 +0000
committerIgor Sysoev <igor@sysoev.ru>2007-09-23 19:29:22 +0000
commit39a3f35b3d682538ce6dbd70f417e43e4d5f6156 (patch)
tree386588a27aaeb2d2a0bd21e605560b5a79439929 /src
parentd0a42bbb58223e164abe75c662bc2ba7f7720334 (diff)
downloadnginx-39a3f35b3d682538ce6dbd70f417e43e4d5f6156.tar.gz
nginx-39a3f35b3d682538ce6dbd70f417e43e4d5f6156.tar.bz2
r1490 merge:
u_char* is enough to keep file name
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http.c4
-rw-r--r--src/http/ngx_http_core_module.c2
-rw-r--r--src/http/ngx_http_core_module.h4
-rw-r--r--src/http/ngx_http_upstream.c4
-rw-r--r--src/http/ngx_http_upstream.h2
-rw-r--r--src/http/ngx_http_upstream_round_robin.c4
6 files changed, 10 insertions, 10 deletions
diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c
index 6c5acd94d..51667d138 100644
--- a/src/http/ngx_http.c
+++ b/src/http/ngx_http.c
@@ -551,8 +551,8 @@ ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
if (in_addr[a].default_server) {
ngx_log_error(NGX_LOG_ERR, cf->log, 0,
- "the duplicate default server in %V:%d",
- &lscf[l].file_name, lscf[l].line);
+ "the duplicate default server in %s:%ui",
+ &lscf[l].file_name, lscf[l].line);
return NGX_CONF_ERROR;
}
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index c7fa92ceb..347cf01b7 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -2595,7 +2595,7 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
ls->family = AF_INET;
ls->addr = u.addr.in_addr;
ls->port = u.port;
- ls->file_name = cf->conf_file->file.name;
+ ls->file_name = cf->conf_file->file.name.data;
ls->line = cf->conf_file->line;
ls->conf.backlog = NGX_LISTEN_BACKLOG;
ls->conf.rcvbuf = -1;
diff --git a/src/http/ngx_http_core_module.h b/src/http/ngx_http_core_module.h
index 5e9b48327..2ddbd7573 100644
--- a/src/http/ngx_http_core_module.h
+++ b/src/http/ngx_http_core_module.h
@@ -38,8 +38,8 @@ typedef struct {
in_port_t port;
int family;
- ngx_str_t file_name;
- ngx_int_t line;
+ u_char *file_name;
+ ngx_uint_t line;
ngx_http_listen_conf_t conf;
} ngx_http_listen_t;
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
index 919dc5903..a662e353a 100644
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -3208,7 +3208,7 @@ ngx_http_upstream_add(ngx_conf_t *cf, ngx_url_t *u, ngx_uint_t flags)
ngx_log_error(NGX_LOG_WARN, cf->log, 0,
"upstream \"%V\" may not have port %d in %s:%ui",
&u->host, uscfp[i]->port,
- uscfp[i]->file_name.data, uscfp[i]->line);
+ uscfp[i]->file_name, uscfp[i]->line);
return NULL;
}
@@ -3232,7 +3232,7 @@ ngx_http_upstream_add(ngx_conf_t *cf, ngx_url_t *u, ngx_uint_t flags)
uscf->flags = flags;
uscf->host = u->host;
- uscf->file_name = cf->conf_file->file.name;
+ uscf->file_name = cf->conf_file->file.name.data;
uscf->line = cf->conf_file->line;
uscf->port = u->port;
uscf->default_port = u->default_port;
diff --git a/src/http/ngx_http_upstream.h b/src/http/ngx_http_upstream.h
index b3bb1b4fd..010a10c7c 100644
--- a/src/http/ngx_http_upstream.h
+++ b/src/http/ngx_http_upstream.h
@@ -91,7 +91,7 @@ struct ngx_http_upstream_srv_conf_s {
ngx_uint_t flags;
ngx_str_t host;
- ngx_str_t file_name;
+ u_char *file_name;
ngx_uint_t line;
in_port_t port;
in_port_t default_port;
diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c
index 068dfc279..36917a0b2 100644
--- a/src/http/ngx_http_upstream_round_robin.c
+++ b/src/http/ngx_http_upstream_round_robin.c
@@ -64,7 +64,7 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf,
if (us->port == 0 && us->default_port == 0) {
ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
"no port in upstream \"%V\" in %s:%ui",
- &us->host, us->file_name.data, us->line);
+ &us->host, us->file_name, us->line);
return NGX_ERROR;
}
@@ -77,7 +77,7 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf,
if (u.err) {
ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
"%s in upstream \"%V\" in %s:%ui",
- u.err, &us->host, us->file_name.data, us->line);
+ u.err, &us->host, us->file_name, us->line);
}
return NGX_ERROR;