[gnome-software] snap: Don't use deprecated snapd-glib method if have suitably new version of lib



commit f032777de7a0f7871105f1d3560b78eaa4432386
Author: Robert Ancell <robert ancell canonical com>
Date:   Mon Oct 30 16:01:11 2017 +1300

    snap: Don't use deprecated snapd-glib method if have suitably new version of lib

 plugins/snap/gs-plugin-snap.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
index c2ab1ec..adaabd9 100644
--- a/plugins/snap/gs-plugin-snap.c
+++ b/plugins/snap/gs-plugin-snap.c
@@ -47,8 +47,10 @@ get_client (GsPlugin *plugin, GError **error)
 
        client = snapd_client_new ();
        snapd_client_set_allow_interaction (client, TRUE);
+#ifndef SNAPD_GLIB_VERSION_1_24
        if (!snapd_client_connect_sync (client, NULL, error))
                return NULL;
+#endif
        old_user_agent = snapd_client_get_user_agent (client);
        user_agent = g_strdup_printf ("%s %s", gs_user_agent (), old_user_agent);
        snapd_client_set_user_agent (client, user_agent);


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