Ignore:
Timestamp:
Nov 26, 2007, 8:27:07 PM (15 years ago)
Author:
charles
Message:

fix stupid bug introduced in the last stats commit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/stats.c

    r3983 r3987  
    139139    const struct tr_stats_handle * stats = handle->sessionStats;
    140140    *setme = stats->single;
    141     setme->ratio = setme->uploadedBytes ? (double)setme->uploadedBytes / (double)setme->downloadedBytes : TR_RATIO_NA;
     141    setme->ratio = setme->downloadedBytes ? (double)setme->uploadedBytes / (double)setme->downloadedBytes : TR_RATIO_NA;
    142142    setme->secondsActive += ( time(NULL) - stats->startTime );
    143143}
     
    149149    const struct tr_stats_handle * stats = handle->sessionStats;
    150150    *setme = stats->cumulative;
    151     setme->ratio = setme->uploadedBytes ? (double)setme->uploadedBytes / (double)setme->downloadedBytes : TR_RATIO_NA;
     151    setme->ratio = setme->downloadedBytes ? (double)setme->uploadedBytes / (double)setme->downloadedBytes : TR_RATIO_NA;
    152152    setme->secondsActive += ( time(NULL) - stats->startTime );
    153153}
Note: See TracChangeset for help on using the changeset viewer.