lib/repo-pull: Add some missing assertions for progress statistics

Various of the counters already have assertions like this; add some more
for total paranoia.

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

Closes: #1594
Approved by: jlebon
This commit is contained in:
Philip Withnall 2018-05-30 12:00:22 +01:00 committed by Atomic Bot
parent c9619a4904
commit 78f40136db
1 changed files with 2 additions and 0 deletions

View File

@ -1119,6 +1119,7 @@ content_fetch_on_complete (GObject *object,
}
out:
g_assert (pull_data->n_outstanding_content_fetches > 0);
pull_data->n_outstanding_content_fetches--;
if (_ostree_fetcher_should_retry_request (local_error, fetch_data->n_retries_remaining--))
@ -1168,6 +1169,7 @@ on_metadata_written (GObject *object,
queue_scan_one_metadata_object_c (pull_data, csum, objtype, fetch_data->path, 0, fetch_data->requested_ref);
out:
g_assert (pull_data->n_outstanding_metadata_write_requests > 0);
pull_data->n_outstanding_metadata_write_requests--;
fetch_object_data_free (fetch_data);