From e1ead940be4f55bc93d89876023997911de1ba13 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 9 Sep 2007 09:15:29 +0000 Subject: [PATCH] - Added some more debug --- src/bittorrent.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index b95818d54..ec2b4d137 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -157,12 +157,13 @@ void bittorrent::updateETAs() { if(h.download_payload_rate()) { listEtas << (qlonglong)((h.actual_size()-h.total_done())/(double)h.download_payload_rate()); ETAstats[hash] = listEtas; - long moy = 0; - long val; + qlonglong moy = 0; + qlonglong val; unsigned int nbETAs = listEtas.size(); Q_ASSERT(nbETAs); foreach(val, listEtas) { moy += (qlonglong)((double)val/(double)nbETAs); + qDebug("ETA: %ld, nbETAs: %d, moy: %ld", (long)val, nbETAs, (long)moy); Q_ASSERT(moy >= 0); } ETAs[hash] = moy;