mirror of
https://github.com/nginx/nginx.git
synced 2026-06-27 12:21:57 +00:00
fix ngx_write_file() buf
This commit is contained in:
parent
ffcc2f4a9e
commit
c31c38b95e
1 changed files with 2 additions and 2 deletions
|
|
@ -76,7 +76,7 @@ ngx_write_file(ngx_file_t *file, u_char *buf, size_t size, off_t offset)
|
|||
#if (NGX_HAVE_PWRITE)
|
||||
|
||||
for ( ;; ) {
|
||||
n = pwrite(file->fd, buf, size, offset);
|
||||
n = pwrite(file->fd, buf + written, size, offset);
|
||||
|
||||
if (n == -1) {
|
||||
ngx_log_error(NGX_LOG_CRIT, file->log, ngx_errno,
|
||||
|
|
@ -108,7 +108,7 @@ ngx_write_file(ngx_file_t *file, u_char *buf, size_t size, off_t offset)
|
|||
}
|
||||
|
||||
for ( ;; ) {
|
||||
n = write(file->fd, buf, size);
|
||||
n = write(file->fd, buf + written, size);
|
||||
|
||||
if (n == -1) {
|
||||
ngx_log_error(NGX_LOG_CRIT, file->log, ngx_errno,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue