[ostree] ostree-fetcher: add max_size argument to change _ostree_metalink_request_sync



commit d48aca5645807c33fb1d6be466b891989aeca067
Author: Giuseppe Scrivano <gscrivan redhat com>
Date:   Thu Nov 6 14:53:52 2014 +0100

    ostree-fetcher: add max_size argument to change _ostree_metalink_request_sync
    
    Signed-off-by: Giuseppe Scrivano <gscrivan redhat com>

 src/libostree/ostree-fetcher.c   |    7 ++++---
 src/libostree/ostree-fetcher.h   |    1 +
 src/libostree/ostree-repo-pull.c |    1 +
 3 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/libostree/ostree-fetcher.c b/src/libostree/ostree-fetcher.c
index 6a70d4e..c9f178b 100644
--- a/src/libostree/ostree-fetcher.c
+++ b/src/libostree/ostree-fetcher.c
@@ -724,6 +724,7 @@ _ostree_fetcher_contents_membuf_sync (OstreeFetcher  *fetcher,
                                       GBytes         **out_contents,
                                       GMainLoop      *loop,
                                       gpointer       user_data,
+                                      guint64        max_size,
                                       GCancellable   *cancellable,
                                       GError         **error)
 {
@@ -744,9 +745,9 @@ _ostree_fetcher_contents_membuf_sync (OstreeFetcher  *fetcher,
   data.error = error;
 
   _ostree_fetcher_stream_uri_async (fetcher, uri,
-                                   OSTREE_MAX_METADATA_SIZE,
-                                   cancellable,
-                                   fetch_uri_sync_on_complete, &data);
+                                    max_size,
+                                    cancellable,
+                                    fetch_uri_sync_on_complete, &data);
 
   run_mainloop_monitor_fetcher (&data);
   if (!data.result_stream)
diff --git a/src/libostree/ostree-fetcher.h b/src/libostree/ostree-fetcher.h
index c6365b3..5dee152 100644
--- a/src/libostree/ostree-fetcher.h
+++ b/src/libostree/ostree-fetcher.h
@@ -94,6 +94,7 @@ gboolean _ostree_fetcher_contents_membuf_sync (OstreeFetcher *fetcher,
                                                GBytes         **out_contents,
                                                GMainLoop      *loop,
                                                gpointer       user_data,
+                                               guint64        max_size,
                                                GCancellable   *cancellable,
                                                GError         **error);
 G_END_DECLS
diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c
index 7a7ed46..ad752ff 100644
--- a/src/libostree/ostree-repo-pull.c
+++ b/src/libostree/ostree-repo-pull.c
@@ -265,6 +265,7 @@ fetch_uri_contents_membuf_sync (OtPullData    *pull_data,
                                               out_contents,
                                               pull_data->loop,
                                               pull_data,
+                                              OSTREE_MAX_METADATA_SIZE,
                                               cancellable,
                                               error);
   pull_data->fetching_sync_uri = NULL;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]