Changeset 11927


Ignore:
Timestamp:
Feb 18, 2011, 12:36:02 AM (11 years ago)
Author:
jch
Message:

Compute accurate overhead for uTP packets.

File:
1 edited

Legend:

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

    r11921 r11927  
    101101
    102102        const unsigned int payload = MIN( next->length, bytes_transferred );
    103         const unsigned int overhead = guessPacketOverhead( payload );
     103        /* For uTP sockets, the overhead is computed in utp_on_overhead. */
     104        const unsigned int overhead =
     105            io->socket ? guessPacketOverhead( payload ) : 0;
    104106        const uint64_t now = tr_sessionGetTimeMsec( io->session );
    105107
     
    453455
    454456    tr_ndbg( "UTP", "On overhead: %d %ld %d", (int)send, (long)count, type );
     457    tr_bandwidthUsed( &io->bandwidth, send ? TR_UP : TR_DOWN,
     458                      count, FALSE, tr_time_msec() );
    455459}
    456460
Note: See TracChangeset for help on using the changeset viewer.