summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2021-04-22 03:03:55 +0200
committerDirk Engling <erdgeist@erdgeist.org>2021-04-22 03:03:55 +0200
commite87978860b1de6822db001cbc1d313694002ea28 (patch)
tree2b7e149528d53fb072fdbb3307c2b7e03f366914
parent1a349bfa4346acd18b8646ec2eaa0f237a83e3f3 (diff)
gzip iovecs always end on the boundary and don't need to be fixed
-rw-r--r--ot_fullscrape.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ot_fullscrape.c b/ot_fullscrape.c
index e7a1c19..c3c6b34 100644
--- a/ot_fullscrape.c
+++ b/ot_fullscrape.c
@@ -30,7 +30,7 @@
30 Full scrapes usually are huge and one does not want to 30 Full scrapes usually are huge and one does not want to
31 allocate more memory. So lets get them in 512k units 31 allocate more memory. So lets get them in 512k units
32*/ 32*/
33#define OT_SCRAPE_CHUNK_SIZE (512*1024) 33#define OT_SCRAPE_CHUNK_SIZE (1024*1024)
34 34
35/* "d8:completei%zde10:downloadedi%zde10:incompletei%zdee" */ 35/* "d8:completei%zde10:downloadedi%zde10:incompletei%zdee" */
36#define OT_SCRAPE_MAXENTRYLEN 256 36#define OT_SCRAPE_MAXENTRYLEN 256
@@ -220,9 +220,10 @@ static void fullscrape_make_gzip( int *iovec_entries, struct iovec **iovector, o
220 /* Check if there still is enough buffer left */ 220 /* Check if there still is enough buffer left */
221 while( !strm.avail_out ) { 221 while( !strm.avail_out ) {
222 /* Allocate a fresh output buffer at the end of our buffers list */ 222 /* Allocate a fresh output buffer at the end of our buffers list */
223 r = iovec_fix_increase_or_free( iovec_entries, iovector, strm.next_out, OT_SCRAPE_CHUNK_SIZE ); 223 r = iovec_increase( iovec_entries, iovector, OT_SCRAPE_CHUNK_SIZE );
224 if( !r ) { 224 if( !r ) {
225 fprintf( stderr, "Problem with iovec_fix_increase_or_free\n" ); 225 fprintf( stderr, "Problem with iovec_fix_increase_or_free\n" );
226 iovec_free( iovec_entries, iovector );
226 deflateEnd(&strm); 227 deflateEnd(&strm);
227 return mutex_bucket_unlock( bucket, 0 ); 228 return mutex_bucket_unlock( bucket, 0 );
228 } 229 }