1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-05 02:58:33 +00:00

fix stupid bug introduced in the last stats commit

This commit is contained in:
Charles Kerr 2007-11-26 20:27:07 +00:00
parent 90741d6d98
commit 548e0324ab

View file

@ -138,7 +138,7 @@ tr_getSessionStats( const tr_handle * handle,
{
const struct tr_stats_handle * stats = handle->sessionStats;
*setme = stats->single;
setme->ratio = setme->uploadedBytes ? (double)setme->uploadedBytes / (double)setme->downloadedBytes : TR_RATIO_NA;
setme->ratio = setme->downloadedBytes ? (double)setme->uploadedBytes / (double)setme->downloadedBytes : TR_RATIO_NA;
setme->secondsActive += ( time(NULL) - stats->startTime );
}
@ -148,7 +148,7 @@ tr_getCumulativeSessionStats( const tr_handle * handle,
{
const struct tr_stats_handle * stats = handle->sessionStats;
*setme = stats->cumulative;
setme->ratio = setme->uploadedBytes ? (double)setme->uploadedBytes / (double)setme->downloadedBytes : TR_RATIO_NA;
setme->ratio = setme->downloadedBytes ? (double)setme->uploadedBytes / (double)setme->downloadedBytes : TR_RATIO_NA;
setme->secondsActive += ( time(NULL) - stats->startTime );
}