Changeset 8296


Ignore:
Timestamp:
Apr 26, 2009, 4:14:47 PM (12 years ago)
Author:
charles
Message:

(trunk libT) experimental commit for wereHamster

Location:
trunk/libtransmission
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/fdlimit.h

    r8291 r8296  
    3636
    3737void tr_close_file( FILE * fp );
     38
     39int64_t tr_lseek( int fd, int64_t offset, int whence );
    3840
    3941
  • trunk/libtransmission/inout.c

    r7720 r8296  
    4949enum { TR_IO_READ, TR_IO_WRITE };
    5050
    51 static int64_t
     51int64_t
    5252tr_lseek( int fd, int64_t offset, int whence )
    5353{
  • trunk/libtransmission/verify.c

    r8291 r8296  
    4444    SHA_CTX sha;
    4545    FILE * fp = NULL;
    46     size_t filePos = 0;
     46    int64_t filePos = 0;
    4747    tr_bool changed = 0;
    4848    tr_bool hadPiece = 0;
     
    8989
    9090        /* read a bit */
    91         if( fp && !fseek( fp, filePos, SEEK_SET ) ) {
     91        if( fp && tr_lseek( fileno(fp), filePos, SEEK_SET ) != -1 ) {
    9292            const int64_t numRead = fread( buffer, 1, bytesThisPass, fp );
    9393            if( numRead == bytesThisPass )
Note: See TracChangeset for help on using the changeset viewer.