mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-23 21:35:26 +03:00
metalink: Allow NULL for "out" params in metalink requests
Caller may not be interested in all the outbound params, particularly "fetching_sync_uri".
This commit is contained in:
parent
3515e01f6a
commit
ebef43eabe
@ -648,7 +648,9 @@ ostree_metalink_request_finish (OstreeMetalink *self,
|
||||
if (g_task_propagate_boolean ((GTask*)result, error))
|
||||
{
|
||||
g_assert_cmpint (request->current_url_index, <, request->urls->len);
|
||||
if (out_target_uri != NULL)
|
||||
*out_target_uri = request->urls->pdata[request->current_url_index];
|
||||
if (out_data != NULL)
|
||||
*out_data = g_strdup (request->result);
|
||||
return TRUE;
|
||||
}
|
||||
@ -708,6 +710,8 @@ _ostree_metalink_request_sync (OstreeMetalink *self,
|
||||
data.out_data = out_data;
|
||||
data.loop = loop;
|
||||
data.error = error;
|
||||
|
||||
if (fetching_sync_uri != NULL)
|
||||
*fetching_sync_uri = _ostree_metalink_get_uri (self);
|
||||
|
||||
request->metalink = g_object_ref (self);
|
||||
|
Loading…
Reference in New Issue
Block a user