Ignore:
Timestamp:
Jul 2, 2009, 2:04:34 AM (13 years ago)
Author:
charles
Message:

(trunk libT) fix r8770 oops

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r8770 r8771  
    1818#include <assert.h>
    1919#include <limits.h> /* INT_MAX */
     20#include <math.h> /* fabs */
    2021#include <string.h> /* memcmp */
    2122#include <stdlib.h> /* qsort */
     
    955956                if( ( tor->etaSpeedCalculatedAt + 800 ) < now ) {
    956957                    tor->etaSpeedCalculatedAt = now;
    957                     tor->etaSpeed = fabs(tor->etaSpeed>0.001)
     958                    tor->etaSpeed = (fabs(tor->etaSpeed)<0.0001)
    958959                        ? s->pieceDownloadSpeed /* if no previous speed, no need to smooth */
    959960                        : 0.8*tor->etaSpeed + 0.2*s->pieceDownloadSpeed; /* smooth across 5 readings */
Note: See TracChangeset for help on using the changeset viewer.