distillers antifrag patch

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

Moderator: Moderators

Locked
Twink
Posts: 436
Joined: 2003-03-31 23:31
Location: New Zealand

distillers antifrag patch

Post by Twink » 2003-09-27 01:21

Hey I applied distillers antifrag patch but was having some trouble with it, for those that dont know about it, read about it here http://dcplusplus.sourceforge.net/forum ... highlight=

so I got it running and all, not sure how effective it is yet. It actually made my dc++ unstable and would crash in the function this code calls


if(d)
q->setDownloadedBytes(d->getPos());

however all that seems to be is this
void setDownloadedBytes(int64_t aSize) { downloadedBytes = aSize; };

it breaks in the setDownloadBytes function if I'm running it in msvc, so I presume there was nothing wrong with d (ie its not null, and its a valid object), I ended up fixing it just by chucking a try catch around if(d)...)

anyway, the main reason I was using this patch was that distiller seemed to this it would be easy to modify to have my queue showing the progress, but getDownloadBytes is always returning 0, which I presume is cos of the failing to set it in the first place. anyone played with this code before?

distiller
Posts: 66
Joined: 2003-01-05 18:05
Location: Sweden
Contact:

Post by distiller » 2003-11-15 04:41

This is a wierd problem I've encountered before.

Any function of a queueItem always returns 0 in the QueueFrame (and maybe elsewhere). The value of downloadedBytes was probably set and had a value when you tried getDownloadedBytes on the queueItem, it just returned 0 anyway.

Therefore I made the getDownloadedBytes in the QueueManager as well, since a function in QueueManager returns the correct result.

Locked