Mercurial > hg > nginx
comparison src/os/unix/ngx_files.c @ 4955:2e4e4084b562 stable-1.2
Merge of r4920, r4939: ngx_write_chain_to_file() fixes.
*) Core: added debug logging of writev() in ngx_write_chain_to_file().
*) Core: fixed ngx_write_chain_to_file() with IOV_MAX reached.
Catched by dav_chunked.t on Solaris. In released versions this might
potentially result in corruption of complex protocol responses if they
were written to disk and there were more distinct buffers than IOV_MAX
in a single write.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 10 Dec 2012 18:04:54 +0000 |
parents | 9be0b6b749ae |
children | 6e374742043e |
comparison
equal
deleted
inserted
replaced
4954:7c034ee61244 | 4955:2e4e4084b562 |
---|---|
239 "writev() \"%s\" has written only %z of %uz", | 239 "writev() \"%s\" has written only %z of %uz", |
240 file->name.data, n, size); | 240 file->name.data, n, size); |
241 return NGX_ERROR; | 241 return NGX_ERROR; |
242 } | 242 } |
243 | 243 |
244 ngx_log_debug2(NGX_LOG_DEBUG_CORE, file->log, 0, | |
245 "writev: %d, %z", file->fd, n); | |
246 | |
244 file->sys_offset += n; | 247 file->sys_offset += n; |
245 file->offset += n; | 248 file->offset += n; |
249 offset += n; | |
246 total += n; | 250 total += n; |
247 | 251 |
248 } while (cl); | 252 } while (cl); |
249 | 253 |
250 return total; | 254 return total; |