comparison src/core/ngx_conf_file.c @ 186:c1f3a3c7c5db

nginx-0.0.1-2003-11-17-00:49:42 import
author Igor Sysoev <igor@sysoev.ru>
date Sun, 16 Nov 2003 21:49:42 +0000
parents d5f50cefc322
children 2357fa41738a
comparison
equal deleted inserted replaced
185:d5f50cefc322 186:c1f3a3c7c5db
53 prev = cf->conf_file; 53 prev = cf->conf_file;
54 ngx_test_null(cf->conf_file, 54 ngx_test_null(cf->conf_file,
55 ngx_palloc(cf->pool, sizeof(ngx_conf_file_t)), 55 ngx_palloc(cf->pool, sizeof(ngx_conf_file_t)),
56 NGX_CONF_ERROR); 56 NGX_CONF_ERROR);
57 57
58 if (ngx_stat_fd(fd, &cf->conf_file->file.info) == -1) { 58 if (ngx_fd_info(fd, &cf->conf_file->file.info) == -1) {
59 ngx_log_error(NGX_LOG_EMERG, cf->log, ngx_errno, 59 ngx_log_error(NGX_LOG_EMERG, cf->log, ngx_errno,
60 ngx_stat_fd_n " %s failed", filename->data); 60 ngx_fd_info_n " %s failed", filename->data);
61 } 61 }
62 62
63 ngx_test_null(cf->conf_file->hunk, 63 ngx_test_null(cf->conf_file->hunk,
64 ngx_create_temp_hunk(cf->pool, 1024), 64 ngx_create_temp_hunk(cf->pool, 1024),
65 NGX_CONF_ERROR); 65 NGX_CONF_ERROR);
308 308
309 for ( ;; ) { 309 for ( ;; ) {
310 310
311 if (h->pos >= h->last) { 311 if (h->pos >= h->last) {
312 if (cf->conf_file->file.offset 312 if (cf->conf_file->file.offset
313 >= ngx_file_size((&cf->conf_file->file.info))) { 313 >= ngx_file_size(&cf->conf_file->file.info)) {
314 return NGX_CONF_FILE_DONE; 314 return NGX_CONF_FILE_DONE;
315 } 315 }
316 316
317 if (h->pos - start) { 317 if (h->pos - start) {
318 ngx_memcpy(h->start, start, h->pos - start); 318 ngx_memcpy(h->start, start, h->pos - start);