FS#21853 - cb_dl_progress cannot be initialized properly when resuming a file
Attached to Project:
Pacman
Opened by Xavier (shining) - Saturday, 27 November 2010, 15:04 GMT
Last edited by Anatol Pomozov (anatolik) - Monday, 10 August 2020, 19:34 GMT
Opened by Xavier (shining) - Saturday, 27 November 2010, 15:04 GMT
Last edited by Anatol Pomozov (anatolik) - Monday, 10 August 2020, 19:34 GMT
|
Details
dload.c does
handle->dlcb(filename, 0, ust.size); even when we are resuming a file at a given offset, because that's the only way to tell cb_dl_progress to re-initialize its counters when we are starting a file download. There are probably many ways to fix this, just unsure which one to choose : 1) track last filename in cb_dl_progress to detect new files and reset counters 2) add a parameter or abuse existing parameters (e.g. filename == NULL) to tell cb_dl_progress to reset 3) add a new callback function to reset or init a new file download at a given offset |
This task depends upon
Closed by Anatol Pomozov (anatolik)
Monday, 10 August 2020, 19:34 GMT
Reason for closing: Implemented
Additional comments about closing: git commit c78eb48d915dc22146073162dda08ddf73c4a508
Monday, 10 August 2020, 19:34 GMT
Reason for closing: Implemented
Additional comments about closing: git commit c78eb48d915dc22146073162dda08ddf73c4a508
I wanted to go ahead and fix it but I hesitated a bit on which way to go. So instead I put it there to record it.
So feedback welcome :) (1, 2 or 3)
toofishes >> just have it get passed a shitload of info
toofishes >> the rates and all would get calced in the backend
I believe your issue is resolved now. PTAL.