Mercurial > hg > nginx-mail
comparison src/core/ngx_conf_file.c @ 665:0b460e61bdcd default tip
Merge with nginx 1.0.0.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 25 Apr 2011 04:22:17 +0400 |
parents | b4dcae568a2a |
children |
comparison
equal
deleted
inserted
replaced
572:06419a2298a9 | 665:0b460e61bdcd |
---|---|
259 } | 259 } |
260 | 260 |
261 if (ngx_close_file(fd) == NGX_FILE_ERROR) { | 261 if (ngx_close_file(fd) == NGX_FILE_ERROR) { |
262 ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno, | 262 ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno, |
263 ngx_close_file_n " %s failed", | 263 ngx_close_file_n " %s failed", |
264 cf->conf_file->file.name.data); | 264 filename->data); |
265 return NGX_CONF_ERROR; | 265 return NGX_CONF_ERROR; |
266 } | 266 } |
267 | 267 |
268 cf->conf_file = prev; | 268 cf->conf_file = prev; |
269 } | 269 } |
505 "missing terminating \"%c\" character", ch); | 505 "missing terminating \"%c\" character", ch); |
506 return NGX_ERROR; | 506 return NGX_ERROR; |
507 } | 507 } |
508 | 508 |
509 if (len) { | 509 if (len) { |
510 ngx_memcpy(b->start, start, len); | 510 ngx_memmove(b->start, start, len); |
511 } | 511 } |
512 | 512 |
513 size = (ssize_t) (file_size - cf->conf_file->file.offset); | 513 size = (ssize_t) (file_size - cf->conf_file->file.offset); |
514 | 514 |
515 if (size > b->end - (b->start + len)) { | 515 if (size > b->end - (b->start + len)) { |
669 need_space = 1; | 669 need_space = 1; |
670 found = 1; | 670 found = 1; |
671 } | 671 } |
672 | 672 |
673 } else if (ch == ' ' || ch == '\t' || ch == CR || ch == LF | 673 } else if (ch == ' ' || ch == '\t' || ch == CR || ch == LF |
674 || ch == ';' || ch == '{') { | 674 || ch == ';' || ch == '{') |
675 { | |
675 last_space = 1; | 676 last_space = 1; |
676 found = 1; | 677 found = 1; |
677 } | 678 } |
678 | 679 |
679 if (found) { | 680 if (found) { |
901 ngx_uint_t i; | 902 ngx_uint_t i; |
902 ngx_list_part_t *part; | 903 ngx_list_part_t *part; |
903 ngx_open_file_t *file; | 904 ngx_open_file_t *file; |
904 | 905 |
905 #if (NGX_SUPPRESS_WARN) | 906 #if (NGX_SUPPRESS_WARN) |
906 full.len = 0; | 907 ngx_str_null(&full); |
907 full.data = NULL; | |
908 #endif | 908 #endif |
909 | 909 |
910 if (name->len) { | 910 if (name->len) { |
911 full = *name; | 911 full = *name; |
912 | 912 |
1004 } | 1004 } |
1005 | 1005 |
1006 | 1006 |
1007 void ngx_cdecl | 1007 void ngx_cdecl |
1008 ngx_conf_log_error(ngx_uint_t level, ngx_conf_t *cf, ngx_err_t err, | 1008 ngx_conf_log_error(ngx_uint_t level, ngx_conf_t *cf, ngx_err_t err, |
1009 char *fmt, ...) | 1009 const char *fmt, ...) |
1010 { | 1010 { |
1011 u_char errstr[NGX_MAX_CONF_ERRSTR], *p, *last; | 1011 u_char errstr[NGX_MAX_CONF_ERRSTR], *p, *last; |
1012 va_list args; | 1012 va_list args; |
1013 | 1013 |
1014 last = errstr + NGX_MAX_CONF_ERRSTR; | 1014 last = errstr + NGX_MAX_CONF_ERRSTR; |