r1490 merge:

u_char* is enough to keep file name
This commit is contained in:
Igor Sysoev 2007-09-23 19:29:22 +00:00
parent d0a42bbb58
commit 39a3f35b3d
6 changed files with 10 additions and 10 deletions

View File

@ -551,8 +551,8 @@ ngx_http_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
if (in_addr[a].default_server) { if (in_addr[a].default_server) {
ngx_log_error(NGX_LOG_ERR, cf->log, 0, ngx_log_error(NGX_LOG_ERR, cf->log, 0,
"the duplicate default server in %V:%d", "the duplicate default server in %s:%ui",
&lscf[l].file_name, lscf[l].line); &lscf[l].file_name, lscf[l].line);
return NGX_CONF_ERROR; return NGX_CONF_ERROR;
} }

View File

@ -2595,7 +2595,7 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
ls->family = AF_INET; ls->family = AF_INET;
ls->addr = u.addr.in_addr; ls->addr = u.addr.in_addr;
ls->port = u.port; 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->line = cf->conf_file->line;
ls->conf.backlog = NGX_LISTEN_BACKLOG; ls->conf.backlog = NGX_LISTEN_BACKLOG;
ls->conf.rcvbuf = -1; ls->conf.rcvbuf = -1;

View File

@ -38,8 +38,8 @@ typedef struct {
in_port_t port; in_port_t port;
int family; int family;
ngx_str_t file_name; u_char *file_name;
ngx_int_t line; ngx_uint_t line;
ngx_http_listen_conf_t conf; ngx_http_listen_conf_t conf;
} ngx_http_listen_t; } ngx_http_listen_t;

View File

@ -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, ngx_log_error(NGX_LOG_WARN, cf->log, 0,
"upstream \"%V\" may not have port %d in %s:%ui", "upstream \"%V\" may not have port %d in %s:%ui",
&u->host, uscfp[i]->port, &u->host, uscfp[i]->port,
uscfp[i]->file_name.data, uscfp[i]->line); uscfp[i]->file_name, uscfp[i]->line);
return NULL; 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->flags = flags;
uscf->host = u->host; 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->line = cf->conf_file->line;
uscf->port = u->port; uscf->port = u->port;
uscf->default_port = u->default_port; uscf->default_port = u->default_port;

View File

@ -91,7 +91,7 @@ struct ngx_http_upstream_srv_conf_s {
ngx_uint_t flags; ngx_uint_t flags;
ngx_str_t host; ngx_str_t host;
ngx_str_t file_name; u_char *file_name;
ngx_uint_t line; ngx_uint_t line;
in_port_t port; in_port_t port;
in_port_t default_port; in_port_t default_port;

View File

@ -64,7 +64,7 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf,
if (us->port == 0 && us->default_port == 0) { if (us->port == 0 && us->default_port == 0) {
ngx_log_error(NGX_LOG_EMERG, cf->log, 0, ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
"no port in upstream \"%V\" in %s:%ui", "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; return NGX_ERROR;
} }
@ -77,7 +77,7 @@ ngx_http_upstream_init_round_robin(ngx_conf_t *cf,
if (u.err) { if (u.err) {
ngx_log_error(NGX_LOG_EMERG, cf->log, 0, ngx_log_error(NGX_LOG_EMERG, cf->log, 0,
"%s in upstream \"%V\" in %s:%ui", "%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; return NGX_ERROR;