[bt-devel] Crash While Canceling Bookshelf Download

Gary Holmlund gary.holmlund at gmail.com
Fri Nov 6 22:15:24 MST 2009


Eeli Kaikkonen wrote:
> I would appreciate very much if you could test some changes in the SWORD
> library in Windows. They are only couple of lines in one file. If we
> find them working, they will be taken into the next SWORD release and we
> can then change BT accordingly.
>
> The details can be found in thread "curl library and download
> termination", 4 posts (unfortunately not all in one thread) in
> http://www.crosswire.org/pipermail/sword-devel/2009-October/thread.html
> and
> http://www.crosswire.org/pipermail/sword-devel/2009-November/thread.html
>
> I can explain further if needed.
>
>   Yours,
> 	Eeli Kaikkonen (Mr.), Oulu, Finland
> 	e-mail: eekaikko at mailx.studentx.oulux.fix (with no x)
>   
Since my_fprogress is not in the CURLFTPTrnsport class I wrote a couple 
of access functions to get the "term" and "statusReporter" variables. I 
made the other changes from the posts.

int my_fprogress(void *clientp, double dltotal, double dlnow, double 
ultotal, double ulnow) {
    if (clientp) {
        ((CURLFTPTransport 
*)clientp)->getStatusReporter()->statusUpdate(dltotal,dlnow);
//        ((StatusReporter *)clientp)->statusUpdate(dltotal, dlnow);
    }
    return ((CURLFTPTransport *)clientp)->getTerminate();
}

It seems to work very well. I tested with multiple downloads and the 
cancel or stop all was almost immediate. I uploaded the version so you 
could try it.

http://sourcearchives.com/downloads/bibletime-2.4.+svnr1763+swordpatch-win32.exe

Gary





More information about the bt-devel mailing list