Skip to content

gs-metered: Remove Mogwai schedule entries when downloads are complete

This was an oversight when the metered data support was originally added: the schedule entry for a download is not automatically removed when the last reference to the MwscScheduleEntry is dropped, and it has to be removed manually.

Add a new function to do that, and call it explicitly when the download is complete (or has failed). A previous version of this patch tried to tie it to the GsApp:state or GsAppList:state of the download, but that was too fragile.

This does break the API in gs-metered.h. There’s no real way around that, other than by deprecating the existing function and adding a replacement. Since metered data is not widely used yet, I thought the need for that was low.

Signed-off-by: Philip Withnall withnall@endlessm.com

Edited by Philip Withnall

Merge request reports