Changeset 7350


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.4x/libtransmission/inout.c

    r7344 r7350  
    3131#include "utils.h"
    3232
    33 #define TR_HASH_BUFSIZE (64*1024)
    34 
    3533/****
    3634*****  Low-level IO functions
     
    219217                 uint8_t *          setme )
    220218{
    221     static uint8_t * buf = NULL;
    222     size_t bytesLeft;
     219    size_t   bytesLeft;
    223220    uint32_t offset = 0;
    224     int success = TRUE;
     221    int      success = TRUE;
    225222    SHA_CTX  sha;
    226 
    227     if( buf == NULL )
    228         buf = tr_new( uint8_t, TR_HASH_BUFSIZE );
    229223
    230224    assert( tor );
     
    237231    while( bytesLeft )
    238232    {
    239         const int len = MIN( bytesLeft, TR_HASH_BUFSIZE );
     233        uint8_t   buf[8192];
     234        const int len = MIN( bytesLeft, sizeof( buf ) );
    240235        success = !tr_ioRead( tor, pieceIndex, offset, len, buf );
    241236        if( !success )
Note: See TracChangeset for help on using the changeset viewer.