Changeset 1604
- Timestamp:
- 02/04/2007 09:42:53 PM (20 months ago)
- Files:
-
- 1 modified
-
trunk/src/mod_deflate.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mod_deflate.c
r1544 r1604 784 784 785 785 if (abs_offset > sce->st.st_size) { 786 log_error_write(srv, __FILE__, __LINE__, "sb", 787 "file was shrinked:", c->file.name); 786 ERROR("file '%s' was shrinked: was %lld, is %lld (%lld, %lld)", 787 BUF_STR(c->file.name), abs_offset, sce->st.st_size, 788 c->file.start, c->offset); 788 789 789 790 return -1; … … 909 910 } 910 911 911 c->offset += toSend;912 if (c->offset == c->file.length) {913 /* we don't need the mmaping anymore */914 if (c->file.mmap.start != MAP_FAILED) {915 munmap(c->file.mmap.start, c->file.mmap.length);916 c->file.mmap.start = MAP_FAILED;917 }918 }919 920 912 return toSend; 921 913 } … … 1015 1007 out += we_want; 1016 1008 max -= we_want; 1009 1010 if (c->type == FILE_CHUNK && 1011 c->offset == c->file.length && 1012 c->file.mmap.start != MAP_FAILED) { 1013 /* we don't need the mmaping anymore */ 1014 munmap(c->file.mmap.start, c->file.mmap.length); 1015 c->file.mmap.start = MAP_FAILED; 1016 } 1017 1017 1018 if (we_have == we_want) { 1018 1019 /* chunk finished */ … … 1034 1035 /* check if we finished compressing all the content. */ 1035 1036 end = (hctx->in->is_closed && hctx->in->bytes_in == hctx->in->bytes_out); 1037 1038 if (p->conf.debug) { 1039 TRACE("end: %d - %lld - %lld", hctx->in->is_closed, hctx->in->bytes_in, hctx->in->bytes_out); 1040 } 1036 1041 1037 1042 /* flush the output buffer to make room for more data. */

