Changeset 3172


Ignore:
Timestamp:
Sep 25, 2007, 11:21:00 PM (15 years ago)
Author:
charles
Message:

accept erdgeist's suggestion of using ensureMinimumFileSize() only on WIN32 -- on posix, seek+write is enough.

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/handshake.c

    r3166 r3172  
    386386    i |= CRYPTO_PROVIDE_CRYPTO; /* always allow crypto */
    387387
    388 #if 0
    389388    if( handshake->allowUnencryptedPeers ) /* sometimes allow plaintext */
    390389        i |= CRYPTO_PROVIDE_PLAINTEXT;
    391 #endif
    392390
    393391   return i;
  • trunk/libtransmission/inout.c

    r3161 r3172  
    115115}
    116116
     117#ifdef WIN32
    117118static int
    118119ensureMinimumFileSize ( const tr_torrent  * tor,
     
    145146    return ret;
    146147}
     148#endif
    147149
    148150static int
     
    169171        const uint64_t bytesThisPass = MIN( buflen, file->length - fileOffset );
    170172
     173#ifdef WIN32
    171174        if( ioMode == TR_IO_WRITE )
    172175            ret = ensureMinimumFileSize( tor, fileIndex,
    173176                                         fileOffset + bytesThisPass );
    174177        if( !ret )
     178#endif
    175179            ret = readOrWriteBytes( tor, ioMode,
    176180                                    fileIndex, fileOffset, buf, bytesThisPass );
Note: See TracChangeset for help on using the changeset viewer.