lib/repo-pull: Factor out enqueue function for ScanObjectQueueData
This introduces no functional changes, but will make upcoming support for retrying downloads easier to add. Signed-off-by: Philip Withnall <withnall@endlessm.com> Closes: #1599 Approved by: jlebon
This commit is contained in:
parent
6d21f83813
commit
8b8952ebee
|
|
@ -215,6 +215,8 @@ static void queue_scan_one_metadata_object (OtPullData *pull_data
|
||||||
guint recursion_depth,
|
guint recursion_depth,
|
||||||
const OstreeCollectionRef *ref);
|
const OstreeCollectionRef *ref);
|
||||||
|
|
||||||
|
static void queue_scan_one_metadata_object_s (OtPullData *pull_data,
|
||||||
|
ScanObjectQueueData *scan_data);
|
||||||
static void queue_scan_one_metadata_object_c (OtPullData *pull_data,
|
static void queue_scan_one_metadata_object_c (OtPullData *pull_data,
|
||||||
const guchar *csum,
|
const guchar *csum,
|
||||||
OstreeObjectType objtype,
|
OstreeObjectType objtype,
|
||||||
|
|
@ -1764,6 +1766,14 @@ queue_scan_one_metadata_object (OtPullData *pull_data,
|
||||||
queue_scan_one_metadata_object_c (pull_data, buf, objtype, path, recursion_depth, ref);
|
queue_scan_one_metadata_object_c (pull_data, buf, objtype, path, recursion_depth, ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
queue_scan_one_metadata_object_s (OtPullData *pull_data,
|
||||||
|
ScanObjectQueueData *scan_data)
|
||||||
|
{
|
||||||
|
g_queue_push_tail (&pull_data->scan_object_queue, scan_data);
|
||||||
|
ensure_idle_queued (pull_data);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
queue_scan_one_metadata_object_c (OtPullData *pull_data,
|
queue_scan_one_metadata_object_c (OtPullData *pull_data,
|
||||||
const guchar *csum,
|
const guchar *csum,
|
||||||
|
|
@ -1780,8 +1790,7 @@ queue_scan_one_metadata_object_c (OtPullData *pull_data,
|
||||||
scan_data->recursion_depth = recursion_depth;
|
scan_data->recursion_depth = recursion_depth;
|
||||||
scan_data->requested_ref = (ref != NULL) ? ostree_collection_ref_dup (ref) : NULL;
|
scan_data->requested_ref = (ref != NULL) ? ostree_collection_ref_dup (ref) : NULL;
|
||||||
|
|
||||||
g_queue_push_tail (&pull_data->scan_object_queue, scan_data);
|
queue_scan_one_metadata_object_s (pull_data, g_steal_pointer (&scan_data));
|
||||||
ensure_idle_queued (pull_data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Called out of the main loop to look at metadata objects which can have
|
/* Called out of the main loop to look at metadata objects which can have
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue