Changeset 7350
- Timestamp:
- Dec 11, 2008, 12:39:45 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.4x/libtransmission/inout.c
r7344 r7350 31 31 #include "utils.h" 32 32 33 #define TR_HASH_BUFSIZE (64*1024)34 35 33 /**** 36 34 ***** Low-level IO functions … … 219 217 uint8_t * setme ) 220 218 { 221 static uint8_t * buf = NULL; 222 size_t bytesLeft; 219 size_t bytesLeft; 223 220 uint32_t offset = 0; 224 int success = TRUE;221 int success = TRUE; 225 222 SHA_CTX sha; 226 227 if( buf == NULL )228 buf = tr_new( uint8_t, TR_HASH_BUFSIZE );229 223 230 224 assert( tor ); … … 237 231 while( bytesLeft ) 238 232 { 239 const int len = MIN( bytesLeft, TR_HASH_BUFSIZE ); 233 uint8_t buf[8192]; 234 const int len = MIN( bytesLeft, sizeof( buf ) ); 240 235 success = !tr_ioRead( tor, pieceIndex, offset, len, buf ); 241 236 if( !success )
Note: See TracChangeset
for help on using the changeset viewer.