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?
distillers antifrag patch
Moderator: Moderators
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.
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.