- Save less trackers errors to save memory

This commit is contained in:
Christophe Dumez 2007-08-29 15:13:20 +00:00
parent a9f1bd4f74
commit 495d6f2bab
2 changed files with 4 additions and 2 deletions

3
TODO
View File

@ -38,6 +38,7 @@
- Allow to automatically delete torrents when they reach a given ratio (in options) : easy
- Allow to limit the number of downloading torrents simultaneously (other are paused until a download finishes)
- Add "Mark all as read" feature for RSS
- Allow to customize lists refreshing interval (in options)
// in v1.0.0 (partial) - WIP
- Check storage st creation + hasher in torrent creation
@ -47,7 +48,7 @@
- Windows port (Chris - Peerkoel)
- write a patch for file_priority(int index), actual_size();
- valgrind --tool=memcheck --leak-check=full src/qbittorrent (Looks ok)
- 134m 35m 16m S 0.3 3.5 4:04.77 qbittorrent
- 129m 30m 16m S 5.8 3.0 0:04.36 qbittorrent
* beta 6
- Translations update (IN PROGRESS)
- Wait for some bug fixes in libtorrent :

View File

@ -40,6 +40,7 @@
#include "deleteThread.h"
#define ETAS_MAX_VALUES 8
#define MAX_TRACKER_ERRORS 2
// Main constructor
bittorrent::bittorrent() : timerScan(0), DHTEnabled(false){
@ -989,7 +990,7 @@ void bittorrent::readAlerts() {
if(h.is_valid()){
QString hash = h.hash();
QList<QPair<QString, QString> > errors = trackersErrors.value(hash, QList<QPair<QString, QString> >());
if(errors.size() > 5)
if(errors.size() > MAX_TRACKER_ERRORS)
errors.removeAt(0);
errors << QPair<QString,QString>(QTime::currentTime().toString("hh:mm:ss"), QString::fromUtf8(a->msg().c_str()));
trackersErrors[hash] = errors;