diff options
Diffstat (limited to 'ot_fullscrape.c')
| -rw-r--r-- | ot_fullscrape.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ot_fullscrape.c b/ot_fullscrape.c index 58546ca..3f60d40 100644 --- a/ot_fullscrape.c +++ b/ot_fullscrape.c | |||
| @@ -152,7 +152,7 @@ static void fullscrape_make( int *iovec_entries, struct iovec **iovector, ot_tas | |||
| 152 | /* Get exclusive access to that bucket */ | 152 | /* Get exclusive access to that bucket */ |
| 153 | ot_vector *torrents_list = mutex_bucket_lock( bucket ); | 153 | ot_vector *torrents_list = mutex_bucket_lock( bucket ); |
| 154 | size_t tor_offset; | 154 | size_t tor_offset; |
| 155 | 155 | ||
| 156 | /* For each torrent in this bucket.. */ | 156 | /* For each torrent in this bucket.. */ |
| 157 | for( tor_offset=0; tor_offset<torrents_list->size; ++tor_offset ) { | 157 | for( tor_offset=0; tor_offset<torrents_list->size; ++tor_offset ) { |
| 158 | /* Address torrents members */ | 158 | /* Address torrents members */ |
| @@ -199,13 +199,13 @@ static void fullscrape_make( int *iovec_entries, struct iovec **iovector, ot_tas | |||
| 199 | /* Check if there still is enough buffer left */ | 199 | /* Check if there still is enough buffer left */ |
| 200 | while( r >= re ) | 200 | while( r >= re ) |
| 201 | if( fullscrape_increase( iovec_entries, iovector, &r, &re WANT_COMPRESSION_GZIP_PARAM( &strm, mode, Z_NO_FLUSH ) ) ) | 201 | if( fullscrape_increase( iovec_entries, iovector, &r, &re WANT_COMPRESSION_GZIP_PARAM( &strm, mode, Z_NO_FLUSH ) ) ) |
| 202 | return mutex_bucket_unlock( bucket ); | 202 | return mutex_bucket_unlock( bucket, 0 ); |
| 203 | 203 | ||
| 204 | IF_COMPRESSION( r = compress_buffer; ) | 204 | IF_COMPRESSION( r = compress_buffer; ) |
| 205 | } | 205 | } |
| 206 | 206 | ||
| 207 | /* All torrents done: release lock on current bucket */ | 207 | /* All torrents done: release lock on current bucket */ |
| 208 | mutex_bucket_unlock( bucket ); | 208 | mutex_bucket_unlock( bucket, 0 ); |
| 209 | 209 | ||
| 210 | /* Parent thread died? */ | 210 | /* Parent thread died? */ |
| 211 | if( !g_opentracker_running ) | 211 | if( !g_opentracker_running ) |
| @@ -225,7 +225,7 @@ static void fullscrape_make( int *iovec_entries, struct iovec **iovector, ot_tas | |||
| 225 | 225 | ||
| 226 | while( r >= re ) | 226 | while( r >= re ) |
| 227 | if( fullscrape_increase( iovec_entries, iovector, &r, &re WANT_COMPRESSION_GZIP_PARAM( &strm, mode, Z_FINISH ) ) ) | 227 | if( fullscrape_increase( iovec_entries, iovector, &r, &re WANT_COMPRESSION_GZIP_PARAM( &strm, mode, Z_FINISH ) ) ) |
| 228 | return mutex_bucket_unlock( bucket ); | 228 | return mutex_bucket_unlock( bucket, 0 ); |
| 229 | deflateEnd(&strm); | 229 | deflateEnd(&strm); |
| 230 | } | 230 | } |
| 231 | #endif | 231 | #endif |
