[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/network/ktorrent/libktorrent/torrent
From:       Ivan Vasic <ivasic () gmail ! com>
Date:       2006-01-09 21:07:05
Message-ID: 1136840825.752716.6982.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 496147 by ivasic:

- Fixed a bug in QM (it was possible to seed more torrents than max seeds is allowed)

 M  +7 -1      queuemanager.cpp  


--- trunk/extragear/network/ktorrent/libktorrent/torrent/queuemanager.cpp #496146:496147
@@ -251,7 +251,13 @@
 	
 	void QueueManager::torrentFinished(kt::TorrentInterface* tc)
 	{
-		tc->setPriority(0); //dequeue this tc
+		//dequeue this tc
+		tc->setPriority(0);
+		//make sure the max_seeds is not reached
+		Out() << "GNR Seed" << getNumRunning(false,true) << endl;
+		if(max_seeds !=0 && max_seeds < getNumRunning(false,true))
+			tc->stop(true);
+		
 		orderQueue();
 	}
 	
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic