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