Changeset 7351


Ignore:
Timestamp:
Dec 11, 2008, 12:39:47 AM (12 years ago)
Author:
charles
Message:

(trunk libT) back out the changes for #1580; closing that ticket as invalid

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/inout.c

    r7343 r7351  
    3131#include "utils.h"
    3232
    33 #define TR_HASH_BUFSIZE (64*1024)
    34 
    3533/****
    3634*****  Low-level IO functions
     
    218216                 uint8_t *          setme )
    219217{
    220     static uint8_t * buf = NULL;
    221     size_t bytesLeft;
     218    size_t   bytesLeft;
    222219    uint32_t offset = 0;
    223     int success = TRUE;
     220    int      success = TRUE;
    224221    SHA_CTX  sha;
    225 
    226     if( buf == NULL )
    227         buf = tr_new( uint8_t, TR_HASH_BUFSIZE );
    228222
    229223    assert( tor );
     
    236230    while( bytesLeft )
    237231    {
    238         const int len = MIN( bytesLeft, TR_HASH_BUFSIZE );
     232        uint8_t   buf[8192];
     233        const int len = MIN( bytesLeft, sizeof( buf ) );
    239234        success = !tr_ioRead( tor, pieceIndex, offset, len, buf );
    240235        if( !success )
Note: See TracChangeset for help on using the changeset viewer.