Ignore:
Timestamp:
May 26, 2010, 3:23:21 PM (12 years ago)
Author:
charles
Message:

(trunk libT) define MAX_BLOCK_SIZE once instead of in a handful of places

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-io.c

    r10671 r10694  
    3232#include "list.h"
    3333#include "net.h"
     34#include "peer-common.h" /* MAX_BLOCK_SIZE */
    3435#include "peer-io.h"
    3536#include "trevent.h" /* tr_runInEventThread() */
     
    721722     * or a few blocks, whichever is bigger.
    722723     * It's okay to tweak this as needed */
    723     const double maxBlockSize = 16 * 1024; /* 16 KiB is from BT spec */
    724724    const double currentSpeed = tr_bandwidthGetPieceSpeed( &io->bandwidth, now, TR_UP );
    725725    const double period = 15; /* arbitrary */
    726726    const double numBlocks = 3.5; /* the 3 is arbitrary; the .5 is to leave room for messages */
    727     return MAX( maxBlockSize*numBlocks, currentSpeed*1024*period );
     727    return MAX( MAX_BLOCK_SIZE*numBlocks, currentSpeed*1024*period );
    728728}
    729729
Note: See TracChangeset for help on using the changeset viewer.