Killing Extra Downloads

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
CynC
Posts: 1
Joined: 2004-06-11 01:47

Killing Extra Downloads

Post by CynC » 2004-06-11 02:08

I recall that in older versions of DC++, when download slots were changed to a smaller number, the excess downloads were killed off immediately...however in the latest version this doesn't seem to work for me, the downloads just linger around but if you close them manually THEN it'll say "All download slots taken" when you attempt to resume it.

Anyone know how to make DC++ kill off these excess downloads?

I believe it's the function in DownloadManager.cpp, "checkDownloads"

void DownloadManager::checkDownloads(UserConnection* aConn) {

However I can't seem to find anything wrong with the code...

if( slotsFull || speedFull ) {
bool extraFull = (SETTING(DOWNLOAD_SLOTS) != 0) && (getDownloads() >= (SETTING(DOWNLOAD_SLOTS)+3));
if(extraFull || !QueueManager::getInstance()->hasDownload(aConn->getUser(), QueueItem::HIGHEST)) {
removeConnection(aConn);
return;
}
}

Just that it doesn't seem to want to initialize when download slots are changed.

Anyone have any tips on how to get this working?

Locked