Blame SOURCES/0001-fetcher-Fix-hung-GTlsInteraction.patch

c8d317
From 5adafd767406820cce260c567a1b936610e8d67a Mon Sep 17 00:00:00 2001
c8d317
From: Matthew Barnes <mbarnes@redhat.com>
c8d317
Date: Tue, 9 Feb 2016 00:58:17 +0000
c8d317
Subject: [PATCH] fetcher: Fix hung GTlsInteraction
c8d317
c8d317
The GTlsInteraction instance must be created in the session thread
c8d317
so it uses the correct GMainContext.
c8d317
---
c8d317
 src/libostree/ostree-fetcher.c | 9 +++++++--
c8d317
 1 file changed, 7 insertions(+), 2 deletions(-)
c8d317
c8d317
diff --git a/src/libostree/ostree-fetcher.c b/src/libostree/ostree-fetcher.c
c8d317
index 665286c..b922321 100644
c8d317
--- a/src/libostree/ostree-fetcher.c
c8d317
+++ b/src/libostree/ostree-fetcher.c
c8d317
@@ -277,7 +277,12 @@ static void
c8d317
 session_thread_set_tls_interaction_cb (ThreadClosure *thread_closure,
c8d317
                                        gpointer data)
c8d317
 {
c8d317
-  GTlsInteraction *interaction = data;
c8d317
+  GTlsCertificate *cert = data;
c8d317
+  glnx_unref_object OstreeTlsCertInteraction *interaction = NULL;
c8d317
+
c8d317
+  /* The GTlsInteraction instance must be created in the
c8d317
+   * session thread so it uses the correct GMainContext. */
c8d317
+  interaction = _ostree_tls_cert_interaction_new (cert);
c8d317
 
c8d317
   g_object_set (thread_closure->session,
c8d317
                 SOUP_SESSION_TLS_INTERACTION,
c8d317
@@ -645,7 +650,7 @@ _ostree_fetcher_set_client_cert (OstreeFetcher   *self,
c8d317
 #ifdef HAVE_LIBSOUP_CLIENT_CERTS
c8d317
   session_thread_idle_add (self->thread_closure,
c8d317
                            session_thread_set_tls_interaction_cb,
c8d317
-                           _ostree_tls_cert_interaction_new (cert),
c8d317
+                           g_object_ref (cert),
c8d317
                            (GDestroyNotify) g_object_unref);
c8d317
 #else
c8d317
   g_warning ("This version of OSTree is compiled without client side certificate support");
c8d317
-- 
c8d317
1.8.3.1
c8d317