Ignore:
Timestamp:
Sep 26, 2006, 10:36:04 PM (16 years ago)
Author:
joshe
Message:

Fix possible uint64_t underflow which could cause insanely huge (16,000,000 TB)

upload and/or download totals to be reported to the tracker.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/transmission.c

    r929 r931  
    393393    }
    394394
     395    tor->downloadedPrev += tor->downloadedCur;
     396    tor->downloadedCur   = 0;
     397    tor->uploadedPrev   += tor->uploadedCur;
     398    tor->uploadedCur     = 0;
     399
    395400    tor->status  = TR_STATUS_CHECK;
    396401    tor->tracker = tr_trackerInit( tor );
     
    541546    }
    542547
    543     s->downloaded = tor->downloaded;
    544     s->uploaded   = tor->uploaded;
     548    s->downloaded = tor->downloadedCur + tor->downloadedPrev;
     549    s->uploaded   = tor->uploadedCur   + tor->uploadedPrev;
    545550
    546551    tr_lockUnlock( &tor->lock );
Note: See TracChangeset for help on using the changeset viewer.