Firstly, sorry for not following the instructions on
submitting bugs. Lack of a proper internet connection
and limited time means I can't do it right now.
Currently the upload queue is a FIFO. The changes I've
made add a priority field to the items in the upload
queue. The default priority is 0 (low). When a friend
requests a file they are given a higher priority (250).
I've also added code to increase priorities when a user
requests a file that is already in the queue.
It is probably easier/quicker to look at the code than
to explain it right now. Have a look at the queue_add()
function.
The result of these changes is that popular files are
serviced more quickly. This should result in more
sources for users to grab the file from and in turn
should reduce the amount of data you will need to upload.
Oh, and the patch allows your friends to queue jump :-)
modified src/upload.c
Logged In: YES
user_id=727249
I've made a few minor changes (untested) to allow the queue
priority settings to be read from the giftd.conf file.
Setting queue/friend, queue/inc_first and queue/inc_others
to 0 should result in a FIFO queue.
The following settings might be useful to try out.
queue/inc_first=1
queue/inc_others=-1
This should result in a single client being pushed up the
queue while others waiting for the same file are pushed down
the queue.
The following settings are probably worth a try to
queue/inc_first=1
queue/inc_others=0
Updated to read settings from config file + min/max fix
Logged In: YES
user_id=727249
Fixed a problem with min and max priority checking code.