test incomplete WriteFile()

This commit is contained in:
Igor Sysoev 2009-09-24 20:05:21 +00:00
parent f4d97e2472
commit 5631879c7a

View File

@ -96,6 +96,13 @@ ngx_write_file(ngx_file_t *file, u_char *buf, size_t size, off_t offset)
return NGX_ERROR;
}
if (n != size) {
ngx_log_error(NGX_LOG_CRIT, file->log, 0,
"WriteFile() \"%s\" has written only %ul of %uz",
file->name.data, n, size);
return NGX_ERROR;
}
file->offset += n;
return n;