Mercurial > hg > nginx
comparison src/core/ngx_file.c @ 170:c42be4185301
nginx-0.0.1-2003-11-03-01:56:18 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 02 Nov 2003 22:56:18 +0000 |
parents | e7e094d34162 |
children | e92c2c647c57 |
comparison
equal
deleted
inserted
replaced
169:edf29bb717da | 170:c42be4185301 |
---|---|
10 int ngx_write_chain_to_temp_file(ngx_temp_file_t *tf, ngx_chain_t *chain) | 10 int ngx_write_chain_to_temp_file(ngx_temp_file_t *tf, ngx_chain_t *chain) |
11 { | 11 { |
12 int rc; | 12 int rc; |
13 | 13 |
14 if (tf->file.fd == NGX_INVALID_FILE) { | 14 if (tf->file.fd == NGX_INVALID_FILE) { |
15 rc = ngx_create_temp_file(&tf->file, &tf->path, tf->pool, | 15 rc = ngx_create_temp_file(&tf->file, tf->path, tf->pool, |
16 tf->persistent); | 16 tf->persistent); |
17 | 17 |
18 if (rc == NGX_ERROR || rc == NGX_AGAIN) { | 18 if (rc == NGX_ERROR || rc == NGX_AGAIN) { |
19 return rc; | 19 return rc; |
20 } | 20 } |
22 if (!tf->persistent && tf->warn) { | 22 if (!tf->persistent && tf->warn) { |
23 ngx_log_error(NGX_LOG_WARN, tf->file.log, 0, tf->warn); | 23 ngx_log_error(NGX_LOG_WARN, tf->file.log, 0, tf->warn); |
24 } | 24 } |
25 } | 25 } |
26 | 26 |
27 return ngx_write_chain_to_file(&tf->file, chain, tf->file.offset, tf->pool); | 27 return ngx_write_chain_to_file(&tf->file, chain, tf->offset, tf->pool); |
28 } | 28 } |
29 | 29 |
30 | 30 |
31 int ngx_create_temp_file(ngx_file_t *file, ngx_path_t *path, | 31 int ngx_create_temp_file(ngx_file_t *file, ngx_path_t *path, |
32 ngx_pool_t *pool, int persistent) | 32 ngx_pool_t *pool, int persistent) |