comparison src/core/ngx_conf_file.c @ 2785:d478379e51ac

*) refactor error_log processing: listen socket log might inherit built-in error_log with zero level, and r2447, r2466, r2467 were not enough *) remove bogus "stderr" level *) some functions and fields renames
author Igor Sysoev <igor@sysoev.ru>
date Thu, 30 Apr 2009 13:53:42 +0000
parents 9b107cdf53f6
children 3e10674139e4
comparison
equal deleted inserted replaced
2784:c2230102df6f 2785:d478379e51ac
856 #if (NGX_SUPPRESS_WARN) 856 #if (NGX_SUPPRESS_WARN)
857 full.len = 0; 857 full.len = 0;
858 full.data = NULL; 858 full.data = NULL;
859 #endif 859 #endif
860 860
861 if (name && name->len) { 861 if (name->len) {
862 full = *name; 862 full = *name;
863 863
864 if (ngx_conf_full_name(cycle, &full, 0) != NGX_OK) { 864 if (ngx_conf_full_name(cycle, &full, 0) != NGX_OK) {
865 return NULL; 865 return NULL;
866 } 866 }
892 file = ngx_list_push(&cycle->open_files); 892 file = ngx_list_push(&cycle->open_files);
893 if (file == NULL) { 893 if (file == NULL) {
894 return NULL; 894 return NULL;
895 } 895 }
896 896
897 if (name && name->len) { 897 if (name->len) {
898 file->fd = NGX_INVALID_FILE; 898 file->fd = NGX_INVALID_FILE;
899 file->name = full; 899 file->name = full;
900 900
901 } else { 901 } else {
902 file->fd = ngx_stderr; 902 file->fd = ngx_stderr;
903 file->name.len = 0; 903 file->name = *name;
904 file->name.data = NULL;
905 } 904 }
906 905
907 file->buffer = NULL; 906 file->buffer = NULL;
908 907
909 return file; 908 return file;