Upload queue

Archived discussion about features (predating the use of Bugzilla as a bug and feature tracker)

Moderator: Moderators

Locked
linobarreca
Posts: 21
Joined: 2003-10-11 08:59

Upload queue

Post by linobarreca » 2004-01-04 18:22

I've developed a simple new DC++ feature.
And I hope it will be considered useful.
Arnet could insert it in a future version of DC++

Basically there's a window like the search spy window.
This window receives events fired from UploadManager::prepareFile
when all upload slots are taken.
The windows lists the number of attemps, the user name and the file name of a rejected upload because of "slots full".
So here the user can see who's trying to download something from you and what he's requesting..

The user so can "grant slot" whenever he decides to do so.

Let me know what do you think about.
Thanks.

Xan1977
Forum Moderator
Posts: 627
Joined: 2003-06-05 20:15

Post by Xan1977 » 2004-01-04 18:48

This will not be added to DC++. Listing which file a person wants isn't possible.

http://sourceforge.net/tracker/index.ph ... tid=527768

linobarreca
Posts: 21
Joined: 2003-10-11 08:59

Post by linobarreca » 2004-01-04 18:59

I already saw that but arnet said "not possible"

what is not possible?
and why?

The feature is useful for this reason:
Imagine you're sharing a lot of MP3s (6mb each) and some DVD's ISOS(4.3gb each) if you have 5 slots you want to GRANT an mp3 upload without let the uploader wait 20 hours (at least)...

So what's the reason for the Reject?

Xan1977
Forum Moderator
Posts: 627
Joined: 2003-06-05 20:15

Post by Xan1977 » 2004-01-04 19:35

Basically, after a downloader asks for a connection, the uploader replies with "No Slots available" before the downloader specifies which file it wants. The transaction between the two is then over. To change this behaviour would add bloat, and I personally don't think it's worth it. I'm pretty sure that's why it is not possible.

BTW, if you're going to shorten arnetheduck's nickname, arne is more appropriate. :wink:

linobarreca
Posts: 21
Joined: 2003-10-11 08:59

Post by linobarreca » 2004-01-04 19:42

this is not true

Code: Select all

bool UploadManager::prepareFile(UserConnection* aSource, const string& aFile, int64_t aResume) {
	[...]
	try {
		file = ShareManager::getInstance()->translateFileName(aFile); <-----------------------here you know what's the file name
		dcdebug("Requested file: %s\n", file.c_str()); //added by me only for debug purposes
	} catch(const ShareException&) {
		aSource->error("File Not Available");
		return false;
	}
	

	if( (!aSource->isSet(UserConnection::FLAG_HASSLOT)) && 
		(getFreeSlots()<=0) && 
		(ui == reservedSlots.end()) &&
		(!aSource->getUser()->getFavoriteGrantSlot())) 
	{
		dcdebug("Average speed: %s/s\n", Util::formatBytes(UploadManager::getInstance()->getAverageSpeed()).c_str());
		if( ((getLastAutoGrant() + 30*1000) > GET_TICK()) || (SETTING(MIN_UPLOAD_SPEED) == 0) || ( (SETTING(MIN_UPLOAD_SPEED)*1024) < UploadManager::getInstance()->getAverageSpeed() ) ) {
			if( !(smallfile || userlist) ||
				!(aSource->isSet(UserConnection::FLAG_HASEXTRASLOT) || (getFreeExtraSlots() > 0) || (aSource->getUser()->isSet(User::OP)) ) || 
				!(aSource->getUser()->isSet(User::DCPLUSPLUS) || aSource->isSet(UserConnection::FLAG_SUPPORTS_MINISLOTS)) 
				) 
			{

				cs.leave();
				fire (event to signal the attempted upload) //modify this
				aSource->maxedOut(); <--------------here you give the NO SLOTS message
				removeConnection(aSource);
				return false;
			}
		}
		setLastAutoGrant(GET_TICK());
	}

linobarreca
Posts: 21
Joined: 2003-10-11 08:59

Post by linobarreca » 2004-01-04 19:55

this is an extract from the debug window.

Code: Select all

threadConnect()
ConnectionManager::onMyNick 01D10538, Sparafucile
ConnectionManager::onKey, leaving to uploadmanager
Requested file: E:\Immagini\Mandrake92-cd2-ext.i586.iso
No free upload slots adding to upload queue
Already present in the upload queue incrementing retry counter (4)

linobarreca
Posts: 21
Joined: 2003-10-11 08:59

Post by linobarreca » 2004-01-04 19:59

So..what's the problem? :)
Maybe I did something wrong... :?
but....actually it works.... :D

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2004-01-04 20:03

Arne does not want an upload queue. (I know, I asked.)

BCDC++ has had this for a while now. :mrgreen:

linobarreca
Posts: 21
Joined: 2003-10-11 08:59

Post by linobarreca » 2004-01-04 20:08

now it's more clear :)

I was wondering what was the technical problem :)

thanks :)

Xan1977
Forum Moderator
Posts: 627
Joined: 2003-06-05 20:15

Post by Xan1977 » 2004-01-04 20:14

Oh, I apologize for the bad info linobarreca.

linobarreca
Posts: 21
Joined: 2003-10-11 08:59

Post by linobarreca » 2004-01-04 20:33

;) don't worry

the post in the "rejected features" said almost the same thing.
It let us imagine that it's not technically possible. ;)

Locked