diff options
Diffstat (limited to 'ot_fullscrape.c')
-rw-r--r-- | ot_fullscrape.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ot_fullscrape.c b/ot_fullscrape.c index 583f847..f50d719 100644 --- a/ot_fullscrape.c +++ b/ot_fullscrape.c | |||
@@ -105,7 +105,8 @@ static int fullscrape_increase( int *iovec_entries, struct iovec **iovector, | |||
105 | *re -= OT_SCRAPE_MAXENTRYLEN; | 105 | *re -= OT_SCRAPE_MAXENTRYLEN; |
106 | strm->next_out = (uint8_t*)*r; | 106 | strm->next_out = (uint8_t*)*r; |
107 | strm->avail_out = OT_SCRAPE_CHUNK_SIZE; | 107 | strm->avail_out = OT_SCRAPE_CHUNK_SIZE; |
108 | if( deflate( strm, zaction ) < Z_OK ) | 108 | zres = deflate( strm, zaction ); |
109 | if( ( zres < Z_OK ) && ( zres != Z_BUF_ERROR ) ) | ||
109 | fprintf( stderr, "deflate() failed while in fullscrape_increase(%d).\n", zaction ); | 110 | fprintf( stderr, "deflate() failed while in fullscrape_increase(%d).\n", zaction ); |
110 | *r = (char*)strm->next_out; | 111 | *r = (char*)strm->next_out; |
111 | } | 112 | } |
@@ -191,9 +192,11 @@ static void fullscrape_make( int *iovec_entries, struct iovec **iovector, ot_tas | |||
191 | 192 | ||
192 | #ifdef WANT_COMPRESSION_GZIP | 193 | #ifdef WANT_COMPRESSION_GZIP |
193 | if( mode & TASK_FLAG_GZIP ) { | 194 | if( mode & TASK_FLAG_GZIP ) { |
195 | int zres; | ||
194 | strm.next_in = (uint8_t*)compress_buffer; | 196 | strm.next_in = (uint8_t*)compress_buffer; |
195 | strm.avail_in = r - compress_buffer; | 197 | strm.avail_in = r - compress_buffer; |
196 | if( deflate( &strm, Z_NO_FLUSH ) < Z_OK ) | 198 | zres = deflate( &strm, Z_NO_FLUSH ); |
199 | if( ( zres < Z_OK ) && ( zres != Z_BUF_ERROR ) ) | ||
197 | fprintf( stderr, "deflate() failed while in fullscrape_make().\n" ); | 200 | fprintf( stderr, "deflate() failed while in fullscrape_make().\n" ); |
198 | r = (char*)strm.next_out; | 201 | r = (char*)strm.next_out; |
199 | } | 202 | } |