Changeset 80 for trunk/libtransmission


Ignore:
Timestamp:
Feb 2, 2006, 1:59:02 AM (17 years ago)
Author:
titer
Message:

Fixed memleak
Don't count small messages in the download rate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/ratecontrol.c

    r63 r80  
    6868    {
    6969        prev = t->prev;
    70         prev->next = NULL;
     70        if( prev )
     71            prev->next = NULL;
     72        else
     73            r->first = NULL;
    7174        free( t );
    72         t = prev;
     75        t       = prev;
     76        r->last = prev;
    7377    }
    7478}
     
    106110{
    107111    tr_transfer_t * t;
     112
     113    if( size < 100 )
     114    {
     115        return;
     116    }
    108117   
    109118    tr_lockLock( &r->lock );
     
    112121    if( r->first )
    113122        r->first->prev = t;
     123    if( !r->last )
     124        r->last = t;
    114125    t->next  = r->first;
    115126    t->prev  = NULL;
Note: See TracChangeset for help on using the changeset viewer.